From b21bda4dc0e69275b66d51ada46950768825e811 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Fri, 14 Jun 2019 11:34:55 -0400 Subject: [PATCH 1/5] some unhelpful commit comment --- doc/modules/linear_model.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/modules/linear_model.rst b/doc/modules/linear_model.rst index 14875abac4d61..679747d3068ee 100644 --- a/doc/modules/linear_model.rst +++ b/doc/modules/linear_model.rst @@ -735,7 +735,10 @@ of a single trial are modeled using a Logistic regression is implemented in :class:`LogisticRegression`. This implementation can fit binary, One-vs-Rest, or multinomial logistic regression with optional :math:`\ell_1`, :math:`\ell_2` or Elastic-Net -regularization. Note that regularization is applied by default. +regularization. + +**Note that regularization is applied by default.** No regularization amounts +to setting C to a very high value. As an optimization problem, binary class :math:`\ell_2` penalized logistic regression minimizes the following cost function: From 318a0a5fc12f62c8bfae48c297331c7c4e938037 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Tue, 18 Jun 2019 09:46:05 -0400 Subject: [PATCH 2/5] Addressed comments --- doc/modules/linear_model.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/modules/linear_model.rst b/doc/modules/linear_model.rst index 679747d3068ee..78021a67a9c79 100644 --- a/doc/modules/linear_model.rst +++ b/doc/modules/linear_model.rst @@ -737,8 +737,9 @@ This implementation can fit binary, One-vs-Rest, or multinomial logistic regression with optional :math:`\ell_1`, :math:`\ell_2` or Elastic-Net regularization. -**Note that regularization is applied by default.** No regularization amounts -to setting C to a very high value. +**Note that regularization is applied by default**, which is common in machine +learning but not in statistics. No regularization amounts to setting C to a +very high value (but with better numerical stability). As an optimization problem, binary class :math:`\ell_2` penalized logistic regression minimizes the following cost function: From 37c63b8653661aff21597d88a0fcfaeebbfa7221 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Thu, 20 Jun 2019 09:26:30 -0400 Subject: [PATCH 3/5] clearer numerical stability --- doc/modules/linear_model.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/modules/linear_model.rst b/doc/modules/linear_model.rst index 78021a67a9c79..0defec3cefa3a 100644 --- a/doc/modules/linear_model.rst +++ b/doc/modules/linear_model.rst @@ -739,7 +739,8 @@ regularization. **Note that regularization is applied by default**, which is common in machine learning but not in statistics. No regularization amounts to setting C to a -very high value (but with better numerical stability). +very high value. Another advantage of regularization is that it improves +numerical stability. As an optimization problem, binary class :math:`\ell_2` penalized logistic regression minimizes the following cost function: From f4fe2b9637efb70b3e2ab527e422ca4037194afd Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Thu, 20 Jun 2019 09:27:41 -0400 Subject: [PATCH 4/5] order --- doc/modules/linear_model.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/modules/linear_model.rst b/doc/modules/linear_model.rst index 0defec3cefa3a..39c3445e26b86 100644 --- a/doc/modules/linear_model.rst +++ b/doc/modules/linear_model.rst @@ -738,9 +738,9 @@ regression with optional :math:`\ell_1`, :math:`\ell_2` or Elastic-Net regularization. **Note that regularization is applied by default**, which is common in machine -learning but not in statistics. No regularization amounts to setting C to a -very high value. Another advantage of regularization is that it improves -numerical stability. +learning but not in statistics. Another advantage of regularization is that +it improves numerical stability. No regularization amounts to setting C to a +very high value. As an optimization problem, binary class :math:`\ell_2` penalized logistic regression minimizes the following cost function: From 7104424555d688f09b16fb87ed08d85c2c1f30bd Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Mon, 24 Jun 2019 09:22:14 -0400 Subject: [PATCH 5/5] used note --- doc/modules/linear_model.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/modules/linear_model.rst b/doc/modules/linear_model.rst index 39c3445e26b86..e7fdbf978998c 100644 --- a/doc/modules/linear_model.rst +++ b/doc/modules/linear_model.rst @@ -737,10 +737,12 @@ This implementation can fit binary, One-vs-Rest, or multinomial logistic regression with optional :math:`\ell_1`, :math:`\ell_2` or Elastic-Net regularization. -**Note that regularization is applied by default**, which is common in machine -learning but not in statistics. Another advantage of regularization is that -it improves numerical stability. No regularization amounts to setting C to a -very high value. +.. note:: + + Regularization is applied by default, which is common in machine + learning but not in statistics. Another advantage of regularization is + that it improves numerical stability. No regularization amounts to + setting C to a very high value. As an optimization problem, binary class :math:`\ell_2` penalized logistic regression minimizes the following cost function: