Middle
How do you measure bias and variance of a model?
sobes.tech AI
Answer from AI
Bias (systematic error) and variance (dispersion) are two key parameters that help evaluate the quality of a machine learning model.
- Bias indicates how much the model's predictions systematically differ from the true values. High bias means the model is too simple and cannot accurately describe the data (underfitting).
- Variance reflects the model's sensitivity to changes in the training data. High variance means the model is too complex and overfits the noise in the data.
To measure bias and variance, data is usually split into training and testing sets:
- Train the model on the training set.
- Calculate the error on the training set (train error) and on the test set (test error).
- High error on both training and testing indicates high bias.
- Low training error but high test error suggests high variance.
Cross-validation methods are used for a more accurate assessment, averaging errors across different data splits.