From d196ea3cc558723e25f089a4826924a6f4e1a62a Mon Sep 17 00:00:00 2001 From: Lee Murray <lee.murray@gmail.com> Date: Thu, 30 Mar 2017 02:19:21 -0700 Subject: [PATCH] [MRG] DOC: improve docstring form 'normalize' (#8658) * DOC: improve docstring form 'normalize' * DOC: improve docstring for 'normalize' * fix double backticks in coordinate descent * add missing path reference * fix line lengths * align language in docstring across files in linear_model --- sklearn/linear_model/base.py | 14 +-- sklearn/linear_model/bayes.py | 28 ++--- sklearn/linear_model/coordinate_descent.py | 133 +++++++++------------ sklearn/linear_model/least_angle.py | 84 ++++++------- sklearn/linear_model/omp.py | 42 +++---- sklearn/linear_model/ridge.py | 56 ++++----- 6 files changed, 154 insertions(+), 203 deletions(-) diff --git a/sklearn/linear_model/base.py b/sklearn/linear_model/base.py index 7ac614a1cd..e3f06ccce5 100644 --- a/sklearn/linear_model/base.py +++ b/sklearn/linear_model/base.py @@ -410,14 +410,12 @@ class LinearRegression(LinearModel, RegressorMixin): (e.g. data is expected to be already centered). normalize : boolean, optional, default False - If True, the regressors X will be normalized before regression. - This parameter is ignored when `fit_intercept` is set to False. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - `preprocessing.StandardScaler` before calling `fit` on an estimator - with `normalize=False`. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` on + an estimator with ``normalize=False``. copy_X : boolean, optional, default True If True, X will be copied; else, it may be overwritten. diff --git a/sklearn/linear_model/bayes.py b/sklearn/linear_model/bayes.py index 542e763612..617f79bb7a 100644 --- a/sklearn/linear_model/bayes.py +++ b/sklearn/linear_model/bayes.py @@ -64,14 +64,12 @@ class BayesianRidge(LinearModel, RegressorMixin): Default is True. normalize : boolean, optional, default False - If True, the regressors X will be normalized before regression. - This parameter is ignored when `fit_intercept` is set to False. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - `preprocessing.StandardScaler` before calling `fit` on an estimator - with `normalize=False`. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. copy_X : boolean, optional, default True If True, X will be copied; else, it may be overwritten. @@ -329,14 +327,12 @@ class ARDRegression(LinearModel, RegressorMixin): Default is True. normalize : boolean, optional, default False - If True, the regressors X will be normalized before regression. - This parameter is ignored when `fit_intercept` is set to False. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - `preprocessing.StandardScaler` before calling `fit` on an estimator - with `normalize=False`. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. copy_X : boolean, optional, default True. If True, X will be copied; else, it may be overwritten. diff --git a/sklearn/linear_model/coordinate_descent.py b/sklearn/linear_model/coordinate_descent.py index f2449c68eb..95cafb29e7 100644 --- a/sklearn/linear_model/coordinate_descent.py +++ b/sklearn/linear_model/coordinate_descent.py @@ -65,14 +65,12 @@ def _alpha_grid(X, y, Xy=None, l1_ratio=1.0, fit_intercept=True, Whether to fit an intercept or not normalize : boolean, optional, default False - If ``True``, the regressors X will be normalized before regression. - This parameter is ignored when ``fit_intercept`` is set to ``False``. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - :class:`preprocessing.StandardScaler` before calling ``fit`` on an estimator - with ``normalize=False``. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. copy_X : boolean, optional, default True If ``True``, X will be copied; else, it may be overwritten. @@ -368,7 +366,8 @@ def enet_path(X, y, l1_ratio=0.5, eps=1e-3, n_alphas=100, alphas=None, Notes ----- - See examples/linear_model/plot_lasso_coordinate_descent_path.py for an example. + See examples/linear_model/plot_lasso_coordinate_descent_path.py for an + example. See also -------- @@ -530,8 +529,8 @@ class ElasticNet(LinearModel, RegressorMixin): alpha : float, optional Constant that multiplies the penalty terms. Defaults to 1.0. See the notes for the exact mathematical meaning of this - parameter.``alpha = 0`` is equivalent to an ordinary least square, solved - by the :class:`LinearRegression` object. For numerical + parameter.``alpha = 0`` is equivalent to an ordinary least square, + solved by the :class:`LinearRegression` object. For numerical reasons, using ``alpha = 0`` with the ``Lasso`` object is not advised. Given this, you should use the :class:`LinearRegression` object. @@ -546,14 +545,12 @@ class ElasticNet(LinearModel, RegressorMixin): data is assumed to be already centered. normalize : boolean, optional, default False - If ``True``, the regressors X will be normalized before regression. - This parameter is ignored when ``fit_intercept`` is set to ``False``. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - :class:`preprocessing.StandardScaler` before calling ``fit`` on an estimator - with ``normalize=False``. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. precompute : True | False | array-like Whether to use a precomputed Gram matrix to speed up @@ -794,14 +791,12 @@ class Lasso(ElasticNet): (e.g. data is expected to be already centered). normalize : boolean, optional, default False - If ``True``, the regressors X will be normalized before regression. - This parameter is ignored when ``fit_intercept`` is set to ``False``. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - :class:`preprocessing.StandardScaler` before calling ``fit`` on an estimator - with ``normalize=False``. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. copy_X : boolean, optional, default True If ``True``, X will be copied; else, it may be overwritten. @@ -1282,14 +1277,12 @@ class LassoCV(LinearModelCV, RegressorMixin): (e.g. data is expected to be already centered). normalize : boolean, optional, default False - If ``True``, the regressors X will be normalized before regression. - This parameter is ignored when ``fit_intercept`` is set to ``False``. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - :class:`preprocessing.StandardScaler` before calling ``fit`` on an estimator - with ``normalize=False``. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. copy_X : boolean, optional, default True If ``True``, X will be copied; else, it may be overwritten. @@ -1436,14 +1429,12 @@ class ElasticNetCV(LinearModelCV, RegressorMixin): (e.g. data is expected to be already centered). normalize : boolean, optional, default False - If ``True``, the regressors X will be normalized before regression. - This parameter is ignored when ``fit_intercept`` is set to ``False``. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - :class:`preprocessing.StandardScaler` before calling ``fit`` on an estimator - with ``normalize=False``. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. copy_X : boolean, optional, default True If ``True``, X will be copied; else, it may be overwritten. @@ -1568,14 +1559,12 @@ class MultiTaskElasticNet(Lasso): (e.g. data is expected to be already centered). normalize : boolean, optional, default False - If ``True``, the regressors X will be normalized before regression. - This parameter is ignored when ``fit_intercept`` is set to ``False``. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - :class:`preprocessing.StandardScaler` before calling ``fit`` on an estimator - with ``normalize=False``. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. copy_X : boolean, optional, default True If ``True``, X will be copied; else, it may be overwritten. @@ -1754,14 +1743,12 @@ class MultiTaskLasso(MultiTaskElasticNet): (e.g. data is expected to be already centered). normalize : boolean, optional, default False - If ``True``, the regressors X will be normalized before regression. - This parameter is ignored when ``fit_intercept`` is set to ``False``. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - :class:`preprocessing.StandardScaler` before calling ``fit`` on an estimator - with ``normalize=False``. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. copy_X : boolean, optional, default True If ``True``, X will be copied; else, it may be overwritten. @@ -1891,14 +1878,12 @@ class MultiTaskElasticNetCV(LinearModelCV, RegressorMixin): (e.g. data is expected to be already centered). normalize : boolean, optional, default False - If ``True``, the regressors X will be normalized before regression. - This parameter is ignored when ``fit_intercept`` is set to ``False``. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - :class:`preprocessing.StandardScaler` before calling ``fit`` on an estimator - with ``normalize=False``. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. copy_X : boolean, optional, default True If ``True``, X will be copied; else, it may be overwritten. @@ -2057,14 +2042,12 @@ class MultiTaskLassoCV(LinearModelCV, RegressorMixin): (e.g. data is expected to be already centered). normalize : boolean, optional, default False - If ``True``, the regressors X will be normalized before regression. - This parameter is ignored when ``fit_intercept`` is set to ``False``. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - :class:`preprocessing.StandardScaler` before calling ``fit`` on an estimator - with ``normalize=False``. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. copy_X : boolean, optional, default True If ``True``, X will be copied; else, it may be overwritten. diff --git a/sklearn/linear_model/least_angle.py b/sklearn/linear_model/least_angle.py index c06720a252..0c004d8246 100644 --- a/sklearn/linear_model/least_angle.py +++ b/sklearn/linear_model/least_angle.py @@ -514,14 +514,12 @@ class Lars(LinearModel, RegressorMixin): Sets the verbosity amount normalize : boolean, optional, default False - If True, the regressors X will be normalized before regression. - This parameter is ignored when `fit_intercept` is set to False. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - `preprocessing.StandardScaler` before calling `fit` on an estimator - with `normalize=False`. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. precompute : True | False | 'auto' | array-like Whether to use a precomputed Gram matrix to speed up @@ -747,14 +745,12 @@ class LassoLars(Lars): Sets the verbosity amount normalize : boolean, optional, default False - If True, the regressors X will be normalized before regression. - This parameter is ignored when `fit_intercept` is set to False. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - `preprocessing.StandardScaler` before calling `fit` on an estimator - with `normalize=False`. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. copy_X : boolean, optional, default True If True, X will be copied; else, it may be overwritten. @@ -904,14 +900,12 @@ def _lars_path_residues(X_train, y_train, X_test, y_test, Gram=None, and LassoLarsIC. normalize : boolean, optional, default False - If True, the regressors X will be normalized before regression. - This parameter is ignored when `fit_intercept` is set to False. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - `preprocessing.StandardScaler` before calling `fit` on an estimator - with `normalize=False`. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. max_iter : integer, optional Maximum number of iterations to perform. @@ -990,14 +984,12 @@ class LarsCV(Lars): Sets the verbosity amount normalize : boolean, optional, default False - If True, the regressors X will be normalized before regression. - This parameter is ignored when `fit_intercept` is set to False. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - `preprocessing.StandardScaler` before calling `fit` on an estimator - with `normalize=False`. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. copy_X : boolean, optional, default True If ``True``, X will be copied; else, it may be overwritten. @@ -1204,14 +1196,12 @@ class LassoLarsCV(LarsCV): Sets the verbosity amount normalize : boolean, optional, default False - If True, the regressors X will be normalized before regression. - This parameter is ignored when `fit_intercept` is set to False. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - `preprocessing.StandardScaler` before calling `fit` on an estimator - with `normalize=False`. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. precompute : True | False | 'auto' | array-like Whether to use a precomputed Gram matrix to speed up @@ -1339,14 +1329,12 @@ class LassoLarsIC(LassoLars): Sets the verbosity amount normalize : boolean, optional, default False - If True, the regressors X will be normalized before regression. - This parameter is ignored when `fit_intercept` is set to False. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - `preprocessing.StandardScaler` before calling `fit` on an estimator - with `normalize=False`. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. copy_X : boolean, optional, default True If True, X will be copied; else, it may be overwritten. diff --git a/sklearn/linear_model/omp.py b/sklearn/linear_model/omp.py index 5328a2ed81..78cf3fb650 100644 --- a/sklearn/linear_model/omp.py +++ b/sklearn/linear_model/omp.py @@ -558,14 +558,12 @@ class OrthogonalMatchingPursuit(LinearModel, RegressorMixin): (e.g. data is expected to be already centered). normalize : boolean, optional, default False - If True, the regressors X will be normalized before regression. - This parameter is ignored when `fit_intercept` is set to `False`. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - `preprocessing.StandardScaler` before calling `fit` on an estimator - with `normalize=False`. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. precompute : {True, False, 'auto'}, default 'auto' Whether to use a precomputed Gram and Xy matrix to speed up @@ -696,14 +694,12 @@ def _omp_path_residues(X_train, y_train, X_test, y_test, copy=True, (e.g. data is expected to be already centered). normalize : boolean, optional, default False - If True, the regressors X will be normalized before regression. - This parameter is ignored when `fit_intercept` is set to `False`. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - `preprocessing.StandardScaler` before calling `fit` on an estimator - with `normalize=False`. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. max_iter : integer, optional Maximum numbers of iterations to perform, therefore maximum features @@ -763,14 +759,12 @@ class OrthogonalMatchingPursuitCV(LinearModel, RegressorMixin): (e.g. data is expected to be already centered). normalize : boolean, optional, default False - If True, the regressors X will be normalized before regression. - This parameter is ignored when `fit_intercept` is set to `False`. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - `preprocessing.StandardScaler` before calling `fit` on an estimator - with `normalize=False`. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. max_iter : integer, optional Maximum numbers of iterations to perform, therefore maximum features diff --git a/sklearn/linear_model/ridge.py b/sklearn/linear_model/ridge.py index 3b67128ac8..9715e2aaef 100644 --- a/sklearn/linear_model/ridge.py +++ b/sklearn/linear_model/ridge.py @@ -532,14 +532,12 @@ class Ridge(_BaseRidge, RegressorMixin): by scipy.sparse.linalg. For 'sag' solver, the default value is 1000. normalize : boolean, optional, default False - If True, the regressors X will be normalized before regression. - This parameter is ignored when `fit_intercept` is set to False. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - `preprocessing.StandardScaler` before calling `fit` on an estimator - with `normalize=False`. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. solver : {'auto', 'svd', 'cholesky', 'lsqr', 'sparse_cg', 'sag', 'saga'} Solver to use in the computational routines: @@ -686,14 +684,12 @@ class RidgeClassifier(LinearClassifierMixin, _BaseRidge): The default value is determined by scipy.sparse.linalg. normalize : boolean, optional, default False - If True, the regressors X will be normalized before regression. - This parameter is ignored when `fit_intercept` is set to False. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - `preprocessing.StandardScaler` before calling `fit` on an estimator - with `normalize=False`. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. solver : {'auto', 'svd', 'cholesky', 'lsqr', 'sparse_cg', 'sag', 'saga'} Solver to use in the computational routines: @@ -1141,14 +1137,12 @@ class RidgeCV(_BaseRidgeCV, RegressorMixin): (e.g. data is expected to be already centered). normalize : boolean, optional, default False - If True, the regressors X will be normalized before regression. - This parameter is ignored when `fit_intercept` is set to False. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - `preprocessing.StandardScaler` before calling `fit` on an estimator - with `normalize=False`. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. scoring : string, callable or None, optional, default: None A string (see model evaluation documentation) or @@ -1244,14 +1238,12 @@ class RidgeClassifierCV(LinearClassifierMixin, _BaseRidgeCV): (e.g. data is expected to be already centered). normalize : boolean, optional, default False - If True, the regressors X will be normalized before regression. - This parameter is ignored when `fit_intercept` is set to False. - When the regressors are normalized, note that this makes the - hyperparameters learnt more robust and almost independent of the number - of samples. The same property is not valid for standardized data. - However, if you wish to standardize, please use - `preprocessing.StandardScaler` before calling `fit` on an estimator - with `normalize=False`. + This parameter is ignored when ``fit_intercept`` is set to False. + If True, the regressors X will be normalized before regression by + subtracting the mean and dividing by the l2-norm. + If you wish to standardize, please use + :class:`sklearn.preprocessing.StandardScaler` before calling ``fit`` + on an estimator with ``normalize=False``. scoring : string, callable or None, optional, default: None A string (see model evaluation documentation) or -- GitLab