Training performance is only part of the story. Validation, error analysis, and bias and variance help decide what to try next.
Training, validation, and test sets
Helps in selecting best model among different options
Helps in selecting best hyperparameters
Generalization error: Theoretical measure of how well ML model performs on unseen data
Test error: measure of how well a model performs on finite test set of data
Why a separate validation set matters
If you only have a training set and a test set, and you use the test set to choose the best model or hyperparameters, you end up indirectly overfitting to the test set.
This overfitting happens not in the training process, but in the model selection process. By selecting the model based on its performance on the test set, you effectively tailor your choice to the specifics of that set, leading to an inflated estimate of the model's performance.
Model selection
Train | Validation | Test
60% 20% 20%

Gap between training and validation error gives degree of variance
Gap between generalization and training error gives degree of bias


Diagnosing bias and variance
| Method | Fixes |
|---|---|
| Try getting additional features | High bias |
| Try adding polynomial features | High bias |
| Try decreasing regularization constant λ | High bias |
| Try increasing regularization constant λ | High variance |
| Get more training examples | High variance |
| Try smaller sets of features | High variance |
Improving neural networks


You can make the networks bigger, but make sure that you apply regularization to prevent overfitting.
The NN on right can perform >= as NN on left if correct regularization is applied agr regularize nae kiya tou over fitting hojaegi.
The development loop and evaluation metrics


It's better to combine both precision and recall to form one score: F1 Score