Skip to content
Lambdian

Hyperparameter

A setting chosen before training (like k, tree depth or learning rate), not learned from the data.

Parameters are learned during training (the weights of a regression, the splits of a tree). Hyperparameters control how learning happens: the number of neighbours in k-NN, the depth of a tree, λ\lambda in ridge, the learning rate and batch size of a network.

They are tuned on validation data, by grid search, random search or Bayesian optimisation, combined with cross-validation. Tuning on the test set makes the final score optimistic.

See it in action