Learning curve (machine learning) explained

In machine learning, a learning curve (or training curve) plots the optimal value of a model's loss function for a training set against this loss function evaluated on a validation data set with same parameters as produced the optimal function.[1] Synonyms include error curve, experience curve, improvement curve and generalization curve.[2]

More abstractly, the learning curve is a curve of (learning effort)-(predictive performance), where usually learning effort means number of training samples and predictive performance means accuracy on testing samples.

The machine learning curve is useful for many purposes including comparing different algorithms,[3] choosing model parameters during design,[4] adjusting optimization to improve convergence, and determining the amount of data used for training.[5]

Formal definition

One model of a machine learning is producing a function,, which given some information,, predicts some variable,, from training data

Xtrain

and

Ytrain

. It is distinct from mathematical optimization because

f

should predict well for

x

outside of

Xtrain

.

We often constrain the possible functions to a parameterized family of functions,

\{f\theta(x):\theta\in\Theta\}

, so that our function is more generalizable[6] or so that the function has certain properties such as those that make finding a good

f

easier, or because we have some a priori reason to think that these properties are true.

Given that it is not possible to produce a function that perfectly fits our data, it is then necessary to produce a loss function

L(f\theta(X),Y')

to measure how good our prediction is. We then define an optimization process which finds a

\theta

which minimizes

L(f\theta(X,Y))

referred to as

\theta*(X,Y)

.

Training curve for amount of data

Then if our training data is

\{x1,x2,...,xn\},\{y1,y2,...yn\}

and our validation data is

\{x1',x2',...xm'\},\{y1',y2',...ym'\}

a learning curve is the plot of the two curves

i\mapsto

L(f
*(X
\thetaYi)
i,

(Xi),Yi)

i\mapsto

L(f
*(X
\thetaYi)
i,

(Xi'),Yi')

where

Xi=\{x1,x2,...xi\}

Training curve for number of iterations

Many optimization processes are iterative, repeating the same step until the process converges to an optimal value. Gradient descent is one such algorithm. If you define

*
\theta
i
as the approximation of the optimal

\theta

after

i

steps, a learning curve is the plot of

i\mapsto

L(f
*(X,
\thetaY)
i

(X),Y)

i\mapsto

L(f
*(X,
\thetaY)
i

(X'),Y')

Choosing the size of the training dataset

It is a tool to find out how much a machine model benefits from adding more training data and whether the estimator suffers more from a variance error or a bias error. If both the validation score and the training score converge to a value that is too low with increasing size of the training set, it will not benefit much from more training data.[7]

In the machine learning domain, there are two implications of learning curves differing in the x-axis of the curves, with experience of the model graphed either as the number of training examples used for learning or the number of iterations used in training the model.[8]

See also

Notes and References

  1. News: 2201.12150 . Mohr, Felix and van Rijn, Jan N. "Learning Curves for Decision Making in Supervised Machine Learning - A Survey." arXiv preprint arXiv:2201.12150 (2022)..
  2. Viering . Tom . Loog . Marco . 2023-06-01 . The Shape of Learning Curves: A Review . IEEE Transactions on Pattern Analysis and Machine Intelligence . 45 . 6 . 7799–7819 . 10.1109/TPAMI.2022.3220744 . 36350870 . 0162-8828. 2103.10948 .
  3. Web site: Madhavan. P.G.. A New Recurrent Neural Network Learning Algorithm for Time Series Prediction. Journal of Intelligent Systems. 113 Fig. 3. 7. 1–2. 1997.
  4. Web site: Machine Learning 102: Practical Advice. Tutorial: Machine Learning for Astronomy with Scikit-learn.
  5. Meek. Christopher. Thiesson, Bo . Heckerman, David . The Learning-Curve Sampling Method Applied to Model-Based Clustering. Journal of Machine Learning Research. Summer 2002. 2. 3. 397. https://web.archive.org/web/20130715142652/http://connection.ebscohost.com/c/articles/7188676/learning-curve-sampling-method-applied-model-based-clustering. dead. 2013-07-15.
  6. Book: Goodfellow. Ian. Deep Learning. Bengio. Yoshua. Courville. Aaron. 2016-11-18. MIT Press. 978-0-262-03561-3. 108. en.
  7. Web site: scikit-learn developers . Validation curves: plotting scores to evaluate models — scikit-learn 0.20.2 documentation . February 15, 2019.
  8. Book: Sammut . Claude . Encyclopedia of Machine Learning . Webb . Geoffrey I. (Eds.) . 28 March 2011 . Springer . 978-0-387-30768-8 . 1st . 578.