Training error (source code)

= Training error

Training error is the average loss evaluated on the same observations used to fit the prediction rule. Flexible fitting usually makes it optimistically biased for prediction error.