Start studying
Module 1 · Machine Learning Module contents
Module 1  ·  Card 8 / 55intermediate

Hyperparameters

Hyperparameters are the settings you choose before training starts.

Learning rate, number of layers, tree depth and k in KNN are all hyperparameters.

The model does not learn them, so you have to pick or search for good values.

They control how the model learns rather than what it learns.

Bad hyperparameters can make a perfectly good model perform terribly.

Learn in depth ↓
Module 01 · Machine Learning · 55 concepts
In depth  /  15 lines

Hyperparameters, in more detail

Hyperparameters are the choices you make before training starts.

The model cannot learn them, because they decide how learning happens.

The learning rate is the most important one in most situations.

Too high and training never settles, too low and it barely moves.

Tree depth, the k in KNN, and the number of layers are all hyperparameters.

There is no formula that hands you the right value.

You try some, you measure, and you try again.

Always measure on validation data, never on the data you trained on.

And never on the test set, or your final score stops meaning anything.

Start with whatever defaults the library gives you.

Defaults are usually sensible, and beating them takes real effort.

Change one thing at a time so you know what caused what.

Some settings interact, which is why one at a time eventually stops working.

Small datasets are far more sensitive to these choices than large ones.

Good hyperparameters cannot rescue bad features or bad labels.

Want the full technical article? Wikipedia ↗
Test yourself

One question on this card. Every option explains itself once you pick, right or wrong.

Question 1
Which of these is a hyperparameter?
Machine Learning

55 concepts in this module, then a graded test with every answer explained.

Study this module →
↑↓ move↵ openesc close