8000 Merge pull request #2 from ArturoAmorQ/review/logistic_math_docs · Micky774/scikit-learn@e610d9b · GitHub
[go: up one dir, main page]

Skip to content

Commit e610d9b

Browse files
authored
Merge pull request #2 from ArturoAmorQ/review/logistic_math_docs
Review for scikit-learn scikit-learn#22382
2 parents 6dd9b43 + 140db83 commit e610d9b

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

doc/modules/linear_model.rst

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -867,12 +867,20 @@ following cost function:
867867
.. math:: \min_{w} C \sum_{i=1}^n \left[-y_i \log(\hat{p}(X_i)) - (1 - y_i) \log(1 - \hat{p}(X_i))\right] + r(w).
868868

869869

870-
We currently provide four choices for the regularization term:
871-
872-
#. `penalty=None` for :math:`r(w) = 0`
873-
#. `penalty=l1` for the pure :math:`\ell_1`-penalty :math:`r(w) = \|w\|_1`
874-
#. :math:`\ell_2,\, r(w) = \frac{1}{2}\|w\|_2^2 = \frac{1}{2}w^T w`
875-
#. ElasticNet, :math:`r(w) = \frac{1 - \rho}{2}w^T w + \rho \|w\|_1`
870+
We currently provide four choices for the regularization term :math:`r(w)` via
871+
the `penalty` argument:
872+
873+
+----------------+-------------------------------------------------+
874+
| penalty | :math:`r(w)` |
875+
+================+=================================================+
876+
| `None` | :math:`0` |
877+
+----------------+-------------------------------------------------+
878+
| :math:`\ell_1` | :math:`\|w\|_1` |
879+
+----------------+-------------------------------------------------+
880+
| :math:`\ell_2` | :math:`\frac{1}{2}\|w\|_2^2 = \frac{1}{2}w^T w` |
881+
+----------------+-------------------------------------------------+
882+
| `ElasticNet` | :math:`\frac{1 - \rho}{2}w^T w + \rho \|w\|_1` |
883+
+----------------+-------------------------------------------------+
876884

877885
For ElasticNet, :math:`\rho` (which corresponds to the `l1_ratio` parameter)
878886
controls the strength of :math:`\ell_1` regularization vs. :math:`\ell_2`

0 commit comments

Comments
 (0)
0