Skip to content

Commit 965b109

Browse files
committed
Merge pull request scikit-learn#3479 from MechCoder/improve_logcv_docs
Improve docstring of Logistic Regression CV model
2 parents 8cd5d85 + 5e028a9 commit 965b109

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

sklearn/linear_model/logistic.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,18 @@ class LogisticRegressionCV(LogisticRegression, BaseEstimator,
719719
regularization with primal formulation. The liblinear solver supports both
720720
L1 and L2 regularization, with a dual formulation only for the L2 penalty.
721721
722+
For the grid of Cs values (that are set by default to be ten values in
723+
a logarithmic scale between 1e-4 and 1e4), the best hyperparameter is
724+
selected by the cross-validator StratifiedKFold, but it can be changed
725+
using the cv parameter. In the case of newton-cg and lbfgs solvers,
726+
we warm start along the path i.e guess the initial coefficients of the
727+
present fit to be the coefficients got after convergence in the previous
728+
fit, so in general it is supposed to be faster.
729+
730+
For a multiclass problem, the hyperparameters for each class are computed
731+
using the best scores got by doing a one-vs-rest in parallel across all
732+
folds and classes. Hence this is not the true multinomial loss.
733+
722734
Parameters
723735
----------
724736
Cs : list of floats | int

0 commit comments

Comments
 (0)