From 668846146f838c57d39f8c01a496bc6df4af5315 Mon Sep 17 00:00:00 2001 From: abhyuday Date: Wed, 22 Feb 2017 16:15:39 +0530 Subject: [PATCH] LogisticregressionCV docs(#8424): documented C_ shape --- sklearn/linear_model/logistic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sklearn/linear_model/logistic.py b/sklearn/linear_model/logistic.py index 7b4bb4fe0fea0..7617f0c3c91b5 100644 --- a/sklearn/linear_model/logistic.py +++ b/sklearn/linear_model/logistic.py @@ -213,7 +213,7 @@ def _logistic_grad_hess(w, X, y, alpha, sample_weight=None): d = sample_weight * z * (1 - z) if sparse.issparse(X): dX = safe_sparse_dot(sparse.dia_matrix((d, 0), - shape=(n_samples, n_samples)), X) + shape=(n_samples, n_samples)), X) else: # Precompute as much as possible dX = d[:, np.newaxis] * X @@ -1488,6 +1488,7 @@ class LogisticRegressionCV(LogisticRegression, BaseEstimator, Array of C that maps to the best scores across every class. If refit is set to False, then for each class, the best C is the average of the C's that correspond to the best scores for each fold. + `C_` is of shape(n_classes,) when the problem is binary. n_iter_ : array, shape (n_classes, n_folds, n_cs) or (1, n_folds, n_cs) Actual number of iterations for all classes, folds and Cs.