Hyperparameter Tuning

The process of searching for better hyperparameter settings to improve model performance.

Which of four runs should go forward?

A fictional document classifier tries two learning rates and two penalty strengths. Every run uses the same training data, validation set, update budget and scoring rule. Higher validation accuracy is better for this comparison.

Learning ratePenaltyCorrect of 100
0.010.182
0.011.085
0.100.183
0.101.079

Why record the whole grid?

The stronger penalty helps at the smaller learning rate and hurts at the larger one in this example. Varying one setting in isolation can miss that interaction. Run two wins this particular grid with 85 correct. The three-item lead over run one need not persist on fresh examples.

Four trays display distinct arrangements of laboratory objects.
A fair comparison records all trial settings and gives each candidate the agreed budget.

What happens after choosing?

Freeze the selection procedure and evaluate the chosen pipeline on independent data. Keep unsuccessful runs in the log. A result selected from many trials benefits from chance, and repeated seeds can reveal whether a small difference is stable.

Follow the idea

Hyperparameter · Separate a trial setting from a learned weight.

Validation Set · Identify which observations may guide selection.

Source · Scikit-learn on searching estimator parameters

Return to Hyperparameter Tuning in the A–Z glossary