Hyperparameters vs parameters

Hello.
In the first question,
with the loop:

for parameter in model.get_params():
    print(parameter)

(The classifier is “HistGradientBoostingClassifier”)
I can get a dict with all parameters

Why my answer is wrong if I select:

max_leaf_nodes
verbose
learning_rate

like hyperparameters, without C and classes_ like parameters of the model

verbose is not hyperparameters?

In this case what is the difference between hyperparameters and parameters?

also I saw sklearn.ensemble.HistGradientBoostingClassifier — scikit-learn 1.0.2 documentation

Thank !!

1 Like

Hello! I am sorry if I cannot provide a very detailed answer without spoiling the question for other users, but I can refer you to the Glossary where we define hyperparameters as:

Aspects of model configuration that are not learnt from data and that impact the generalization and computational performance of a model. Examples of hyperparameters:

  • for a k-nearest neighbor approach, the number of neighbors to use is a hyperparameter
  • for a polynomial model (say of degree between 1 and 10 for example), the degree of the polynomial is a hyperparameter.

Indeed, hyperparameters of a model are usually inspected with regard to their impact on the model performance and tuned to maximize model performance (usually generalization performance ).

For more details, you can further read the following post.

I had the same question about verbose as a parameter or hyperparameter. I think I understand now from the documentation that even though this parameter appears when you use model.get_params(), it is informational and will not impact the model results. Thanks

3 Likes