Lesson 4 of 4
Overfitting and validation
Watch, read the card, then practise. Overfitting and underfitting · Cross-validation · Regularisation
The video for this lesson is being recorded.
Meanwhile, the notes below and the 60-second cards cover the same ideas.
Practise this topicOverfitting and underfitting
Overfitting is memorising the training data; underfitting is not learning enough from it.
Remember: Compare training and test scores. A big gap means overfitting.
Cross-validation
Cross-validation tests a model several times on different slices of the data, for a fairer score.
Remember: More reliable than one split, especially with small data.
Regularisation
Regularisation adds a penalty for large weights, which keeps a model simpler and stops overfitting.
Remember: Too much penalty underfits; too little overfits. Tune it.
Try the example in Code Lab
scores = [0.82, 0.85, 0.80, 0.84, 0.79] print(round(sum(scores) / len(scores), 2))