@@ -456,11 +456,13 @@ def logistic_regression_path(X, y, pos_class=None, Cs=10, fit_intercept=True,
456456 is called repeatedly with the same data, as y is modified
457457 along the path.
458458
459- class_weight : {dict, 'auto'}, optional
460- Over-/undersamples the samples of each class according to the given
461- weights. If not given, all classes are supposed to have weight one.
462- The 'auto' mode selects weights inversely proportional to class
463- frequencies in the training set.
459+ class_weight : dict or 'balanced', optional
460+ Weights associated with classes in the form ``{class_label: weight}``.
461+ If not given, all classes are supposed to have weight one.
462+
463+ The "balanced" mode uses the values of y to automatically adjust
464+ weights inversely proportional to class frequencies in the input data
465+ as ``n_samples / (n_classes * np.bincount(y))``
464466
465467 dual : bool
466468 Dual or primal formulation. Dual formulation is only implemented for
@@ -729,11 +731,13 @@ def _log_reg_scoring_path(X, y, train, test, pos_class=None, Cs=10,
729731 tol : float
730732 Tolerance for stopping criteria.
731733
732- class_weight : {dict, 'auto'}, optional
733- Over-/undersamples the samples of each class according to the given
734- weights. If not given, all classes are supposed to have weight one.
735- The 'auto' mode selects weights inversely proportional to class
736- frequencies in the training set.
734+ class_weight : dict or 'balanced', optional
735+ Weights associated with classes in the form ``{class_label: weight}``.
736+ If not given, all classes are supposed to have weight one.
737+
738+ The "balanced" mode uses the values of y to automatically adjust
739+ weights inversely proportional to class frequencies in the input data
740+ as ``n_samples / (n_classes * np.bincount(y))``
737741
738742 verbose : int
739743 For the liblinear and lbfgs solvers set verbose to any positive
@@ -897,11 +901,13 @@ class LogisticRegression(BaseEstimator, LinearClassifierMixin,
897901 To lessen the effect of regularization on synthetic feature weight
898902 (and therefore on the intercept) intercept_scaling has to be increased.
899903
900- class_weight : {dict, 'auto'}, optional
901- Over-/undersamples the samples of each class according to the given
902- weights. If not given, all classes are supposed to have weight one.
903- The 'auto' mode selects weights inversely proportional to class
904- frequencies in the training set.
904+ class_weight : dict or 'balanced', optional
905+ Weights associated with classes in the form ``{class_label: weight}``.
906+ If not given, all classes are supposed to have weight one.
907+
908+ The "balanced" mode uses the values of y to automatically adjust
909+ weights inversely proportional to class frequencies in the input data
910+ as ``n_samples / (n_classes * np.bincount(y))``
905911
906912 max_iter : int
907913 Useful only for the newton-cg and lbfgs solvers. Maximum number of
@@ -1147,11 +1153,13 @@ class LogisticRegressionCV(LogisticRegression, BaseEstimator,
11471153 Specifies if a constant (a.k.a. bias or intercept) should be
11481154 added the decision function.
11491155
1150- class_weight : {dict, 'auto'}, optional
1151- Over-/undersamples the samples of each class according to the given
1152- weights. If not given, all classes are supposed to have weight one.
1153- The 'auto' mode selects weights inversely proportional to class
1154- frequencies in the training set.
1156+ class_weight : dict or 'balanced', optional
1157+ Weights associated with classes in the form ``{class_label: weight}``.
1158+ If not given, all classes are supposed to have weight one.
1159+
1160+ The "balanced" mode uses the values of y to automatically adjust
1161+ weights inversely proportional to class frequencies in the input data
1162+ as ``n_samples / (n_classes * np.bincount(y))``
11551163
11561164 cv : integer or cross-validation generator
11571165 The default cross-validation generator used is Stratified K-Folds.
@@ -1182,11 +1190,13 @@ class LogisticRegressionCV(LogisticRegression, BaseEstimator,
11821190 max_iter : int, optional
11831191 Maximum number of iterations of the optimization algorithm.
11841192
1185- class_weight : {dict, 'auto'}, optional
1186- Over-/undersamples the samples of each class according to the given
1187- weights. If not given, all classes are supposed to have weight one.
1188- The 'auto' mode selects weights inversely proportional to class
1189- frequencies in the training set.
1193+ class_weight : dict or 'balanced', optional
1194+ Weights associated with classes in the form ``{class_label: weight}``.
1195+ If not given, all classes are supposed to have weight one.
1196+
1197+ The "balanced" mode uses the values of y to automatically adjust
1198+ weights inversely proportional to class frequencies in the input data
1199+ as ``n_samples / (n_classes * np.bincount(y))``
11901200
11911201 n_jobs : int, optional
11921202 Number of CPU cores used during the cross-validation loop. If given
0 commit comments