What is the difference between model parameters and hyperparameters?
Show the answer and explanation
Correct answer: D, Parameters are learned from the data during fitting; hyperparameters are set before training to configure the learner.
Explanation Hyperparameter Tuning
Parameters are the values the learning algorithm estimates from the training data, such as the weights of a linear model or a neural network. Hyperparameters are chosen before training and are not learned by that fit: they configure the model or the learning process, e.g. learning rate, regularization strength λ, tree depth or number of layers.
| Parameters | Hyperparameters | |
|---|---|---|
| Set by | the training algorithm | the practitioner or a tuning search |
| Example | regression coefficients | learning rate, λ |
Why the other statements are wrong:
- The roles are swapped: the user sets hyperparameters, the optimizer learns parameters.
- Both linear models and neural networks have learned parameters (coefficients or weights) as well as hyperparameters.
- Features are the model's inputs; the weights on those features are the learned parameters.
Interview tip: add that hyperparameters are tuned on a validation set or with cross-validation, not on the test set.