32042
scikit-learn Docs · نسخهٔ 5e9184e53cd3 · BSD-3-Clause
- The parameters
Coflinear_model.LogisticRegressionandCsof
linear_model.LogisticRegressionCV are deprecated and will be removed in version 1.14. There are new parameters alpha and alphas instead with the following relationship:
- for
LogisticRegression:alpha = 1/C - for
LogisticRegressionCV:alphas = Csfor integer values,alphas = 1/Csfor
array-likes of float
They have the following default values:
alpha=1.0forLogisticRegression, meaning it is the same default asC=1.0.alphas=10forLogisticRegressionCV, meaning it is the same default asCs=10.
This means that the defaults result in the same models as before (up to floating point precision).
With this change the penalty parameter of most linear models is alpha, the larger its value the stronger the penalty. For L2-penalties, the parametrization is similar to linear_model.Ridge where the penalty gets weaker the larger the training dataset (by a factor of 1/n_samples).
For linear_model.LogisticRegressionCV, also the attributes C_ and Cs_ are deprecated. Use the new attributes alpha_ and alphas_ instead. By Christian Lorentzen <lorentzenchr>.