Aller au contenu principal

Learning curve (machine learning)


Learning curve (machine learning)


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. Synonyms include error curve, experience curve, improvement curve and generalization curve.

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, choosing model parameters during design, adjusting optimization to improve convergence, and determining the amount of data used for training.

Formal definition

One model of a machine learning is producing a function, f(x), which given some information, x, predicts some variable, y, from training data X train {\displaystyle X_{\text{train}}} and Y train {\displaystyle Y_{\text{train}}} . It is distinct from mathematical optimization because f {\displaystyle f} should predict well for x {\displaystyle x} outside of X train {\displaystyle X_{\text{train}}} .

We often constrain the possible functions to a parameterized family of functions, { f θ ( x ) : θ Θ } {\displaystyle \{f_{\theta }(x):\theta \in \Theta \}} , so that our function is more generalizable or so that the function has certain properties such as those that make finding a good f {\displaystyle f} easier, or because we have some a priori reason to think that these properties are true.: 172 

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 θ ( X ) , Y ) {\displaystyle L(f_{\theta }(X),Y')} to measure how good our prediction is. We then define an optimization process which finds a θ {\displaystyle \theta } which minimizes L ( f θ ( X , Y ) ) {\displaystyle L(f_{\theta }(X_{,}Y))} referred to as θ ( X , Y ) {\displaystyle \theta ^{*}(X,Y)} .

Training curve for amount of data

Then if our training data is { x 1 , x 2 , , x n } , { y 1 , y 2 , y n } {\displaystyle \{x_{1},x_{2},\dots ,x_{n}\},\{y_{1},y_{2},\dots y_{n}\}} and our validation data is { x 1 , x 2 , x m } , { y 1 , y 2 , y m } {\displaystyle \{x_{1}',x_{2}',\dots x_{m}'\},\{y_{1}',y_{2}',\dots y_{m}'\}} a learning curve is the plot of the two curves

  1. i L ( f θ ( X i , Y i ) ( X i ) , Y i ) {\displaystyle i\mapsto L(f_{\theta ^{*}(X_{i},Y_{i})}(X_{i}),Y_{i})}
  2. i L ( f θ ( X i , Y i ) ( X i ) , Y i ) {\displaystyle i\mapsto L(f_{\theta ^{*}(X_{i},Y_{i})}(X_{i}'),Y_{i}')}

where X i = { x 1 , x 2 , x i } {\displaystyle X_{i}=\{x_{1},x_{2},\dots x_{i}\}}

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 θ i {\displaystyle \theta _{i}^{*}} as the approximation of the optimal θ {\displaystyle \theta } after i {\displaystyle i} steps, a learning curve is the plot of

  1. i L ( f θ i ( X , Y ) ( X ) , Y ) {\displaystyle i\mapsto L(f_{\theta _{i}^{*}(X,Y)}(X),Y)}
  2. i L ( f θ i ( X , Y ) ( X ) , Y ) {\displaystyle i\mapsto L(f_{\theta _{i}^{*}(X,Y)}(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.

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.

See also

  • Overfitting
  • Bias–variance tradeoff
  • Model selection
  • Cross-validation (statistics)
  • Validity (statistics)
  • Verification and validation
  • Double descent

References


Text submitted to CC-BY-SA license. Source: Learning curve (machine learning) by Wikipedia (Historical)