Understanding ElasticNetCV Argument n_alphas

Asked 2 years ago, Updated 2 years ago, 101 views

The official scikit-learn document says "Number of alpha long the regularization path, used for each l1_ratio." Could you tell me what Elasticnet's "n_alpha" argument is?

python machine-learning scikit-learn

2022-09-30 14:26

1 Answers

In the case of a normal ElasticNet, cross-validation is not performed internally, so you specify a single alpha, but in the case of CV, cross-validation processes the parameters to be grid-searched, so you can specify multiple alpha.If n_alphas is specified and alphas=None is automatically configured as many as n_alphas.ElasticNetCV scores on each of these alpha-trained models and finds the best alpha.


2022-09-30 14:26

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.