From 02185d50d7e5f81914208654cffe91e7743db001 Mon Sep 17 00:00:00 2001 From: Michele Lacchia Date: Fri, 12 May 2017 16:01:23 +0200 Subject: [PATCH 1/3] DOC fix typos in linear_model.rst --- doc/modules/linear_model.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/modules/linear_model.rst b/doc/modules/linear_model.rst index f0a97f323c76c..c3a748e28856e 100644 --- a/doc/modules/linear_model.rst +++ b/doc/modules/linear_model.rst @@ -533,8 +533,8 @@ This can be done by introducing `uninformative priors `__ over the hyper parameters of the model. The :math:`\ell_{2}` regularization used in `Ridge Regression`_ is equivalent -to finding a maximum a-postiori solution under a Gaussian prior over the -parameters :math:`w` with precision :math:`\lambda^-1`. Instead of setting +to finding a maximum a posteriori estimation under a Gaussian prior over the +parameters :math:`w` with precision :math:`\lambda^{-1}`. Instead of setting `\lambda` manually, it is possible to treat it as a random variable to be estimated from the data. From 72a3234405047ee913c7098cac5791a32512a003 Mon Sep 17 00:00:00 2001 From: Michele Lacchia Date: Fri, 12 May 2017 16:11:18 +0200 Subject: [PATCH 2/3] Another typo --- doc/modules/linear_model.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/modules/linear_model.rst b/doc/modules/linear_model.rst index dd297f8d5a7ab..b3e82b56a48a2 100644 --- a/doc/modules/linear_model.rst +++ b/doc/modules/linear_model.rst @@ -601,7 +601,7 @@ remaining hyperparameters are the parameters of the gamma priors over *non-informative*. The parameters are estimated by maximizing the *marginal log likelihood*. -By default :math:`\alpha_1 = \alpha_2 = \lambda_1 = \lambda_2 = 1.e^{-6}`. +By default :math:`\alpha_1 = \alpha_2 = \lambda_1 = \lambda_2 = 10^{-6}`. .. figure:: ../auto_examples/linear_model/images/sphx_glr_plot_bayesian_ridge_001.png From 6571707d0448e1b02b53e58063bd1169f684fcfd Mon Sep 17 00:00:00 2001 From: Michele Lacchia Date: Sat, 13 May 2017 19:31:35 +0200 Subject: [PATCH 3/3] DOC: add missing default value in LinearRegression docstring and fix typo --- sklearn/linear_model/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sklearn/linear_model/base.py b/sklearn/linear_model/base.py index 5fa412a494dcf..4a3473815b30d 100644 --- a/sklearn/linear_model/base.py +++ b/sklearn/linear_model/base.py @@ -404,9 +404,9 @@ class LinearRegression(LinearModel, RegressorMixin): Parameters ---------- - fit_intercept : boolean, optional + fit_intercept : boolean, optional, default True whether to calculate the intercept for this model. If set - to false, no intercept will be used in calculations + to False, no intercept will be used in calculations (e.g. data is expected to be already centered). normalize : boolean, optional, default False