Machine learning with football · Chapter 7 · Datasets and overfitting

Model complexity

Simpler models usually travel better. Penalize complexity while you train.

Estimated time: 10 minutes · page 9 of 12

Simpler travels better

Occam's razor says to prefer the simpler of two explanations that fit. For models: a complex model usually wins on the training set, a simple one usually wins on new data, and new data is what counts.

The board compares two models on the same date split. One has a single feature, the goal difference gap from chapter 3, worked out from the training matches only. The other is the club model with 40 weights. Look at how far each one's validation loss is from its training loss.

You can also build the preference for simplicity into training. Instead of minimising the loss alone, minimise

loss + λ · complexity

where complexity is measured from the weights, through their sizes (L1) or their squares (L2). This is regularization, which chapter 3 introduced and the next page looks at closely. The bias doesn't count, since it says nothing about complexity.

Check yourself

Which of these measure model complexity for regularization? Pick all that apply.
How many features should a new model start with?

Leagues