| 1 | diff --git a/sklearn/linear_model/ridge.py b/sklearn/linear_model/ridge.py |
| 2 | --- a/sklearn/linear_model/ridge.py |
| 3 | +++ b/sklearn/linear_model/ridge.py |
| 4 | @@ -1212,18 +1212,18 @@ class RidgeCV(_BaseRidgeCV, RegressorMixin): |
| 5 | |
| 6 | store_cv_values : boolean, default=False |
| 7 | Flag indicating if the cross-validation values corresponding to |
| 8 | - each alpha should be stored in the `cv_values_` attribute (see |
| 9 | - below). This flag is only compatible with `cv=None` (i.e. using |
| 10 | + each alpha should be stored in the ``cv_values_`` attribute (see |
| 11 | + below). This flag is only compatible with ``cv=None`` (i.e. using |
| 12 | Generalized Cross-Validation). |
| 13 | |
| 14 | Attributes |
| 15 | ---------- |
| 16 | cv_values_ : array, shape = [n_samples, n_alphas] or \ |
| 17 | shape = [n_samples, n_targets, n_alphas], optional |
| 18 | - Cross-validation values for each alpha (if `store_cv_values=True` and \ |
| 19 | - `cv=None`). After `fit()` has been called, this attribute will \ |
| 20 | - contain the mean squared errors (by default) or the values of the \ |
| 21 | - `{loss,score}_func` function (if provided in the constructor). |
| 22 | + Cross-validation values for each alpha (if ``store_cv_values=True``\ |
| 23 | + and ``cv=None``). After ``fit()`` has been called, this attribute \ |
| 24 | + will contain the mean squared errors (by default) or the values \ |
| 25 | + of the ``{loss,score}_func`` function (if provided in the constructor). |
| 26 | |
| 27 | coef_ : array, shape = [n_features] or [n_targets, n_features] |
| 28 | Weight vector(s). |
| 29 | @@ -1301,14 +1301,19 @@ class RidgeClassifierCV(LinearClassifierMixin, _BaseRidgeCV): |
| 30 | weights inversely proportional to class frequencies in the input data |
| 31 | as ``n_samples / (n_classes * np.bincount(y))`` |
| 32 | |
| 33 | + store_cv_values : boolean, default=False |
| 34 | + Flag indicating if the cross-validation values corresponding to |
| 35 | + each alpha should be stored in the ``cv_values_`` attribute (see |
| 36 | + below). This flag is only compatible with ``cv=None`` (i.e. using |
| 37 | + Generalized Cross-Validation). |
| 38 | + |
| 39 | Attributes |
| 40 | ---------- |
| 41 | - cv_values_ : array, shape = [n_samples, n_alphas] or \ |
| 42 | - shape = [n_samples, n_responses, n_alphas], optional |
| 43 | - Cross-validation values for each alpha (if `store_cv_values=True` and |
| 44 | - `cv=None`). After `fit()` has been called, this attribute will contain \ |
| 45 | - the mean squared errors (by default) or the values of the \ |
| 46 | - `{loss,score}_func` function (if provided in the constructor). |
| 47 | + cv_values_ : array, shape = [n_samples, n_targets, n_alphas], optional |
| 48 | + Cross-validation values for each alpha (if ``store_cv_values=True`` and |
| 49 | + ``cv=None``). After ``fit()`` has been called, this attribute will |
| 50 | + contain the mean squared errors (by default) or the values of the |
| 51 | + ``{loss,score}_func`` function (if provided in the constructor). |
| 52 | |
| 53 | coef_ : array, shape = [n_features] or [n_targets, n_features] |
| 54 | Weight vector(s). |
| 55 | @@ -1333,10 +1338,11 @@ class RidgeClassifierCV(LinearClassifierMixin, _BaseRidgeCV): |
| 56 | advantage of the multi-variate response support in Ridge. |
| 57 | """ |
| 58 | def __init__(self, alphas=(0.1, 1.0, 10.0), fit_intercept=True, |
| 59 | - normalize=False, scoring=None, cv=None, class_weight=None): |
| 60 | + normalize=False, scoring=None, cv=None, class_weight=None, |
| 61 | + store_cv_values=False): |
| 62 | super(RidgeClassifierCV, self).__init__( |
| 63 | alphas=alphas, fit_intercept=fit_intercept, normalize=normalize, |
| 64 | - scoring=scoring, cv=cv) |
| 65 | + scoring=scoring, cv=cv, store_cv_values=store_cv_values) |
| 66 | self.class_weight = class_weight |
| 67 | |
| 68 | def fit(self, X, y, sample_weight=None): |