Skip to content

Commit ce41907

Browse files
authored
DOC Error in the notation of the regularization penalties for multinomial logistic regression in the docs (scikit-learn#26517)
1 parent 856fbd0 commit ce41907

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

doc/modules/linear_model.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -951,16 +951,17 @@ The objective for the optimization becomes
951951

952952
Where :math:`[P]` represents the Iverson bracket which evaluates to :math:`0`
953953
if :math:`P` is false, otherwise it evaluates to :math:`1`. We currently provide four choices
954-
for the regularization term :math:`r(W)` via the `penalty` argument:
954+
for the regularization term :math:`r(W)` via the `penalty` argument, where :math:`m`
955+
is the number of features:
955956

956957
+----------------+----------------------------------------------------------------------------------+
957958
| penalty | :math:`r(W)` |
958959
+================+==================================================================================+
959960
| `None` | :math:`0` |
960961
+----------------+----------------------------------------------------------------------------------+
961-
| :math:`\ell_1` | :math:`\|W\|_{1,1} = \sum_{i=1}^n\sum_{j=1}^{K}|W_{i,j}|` |
962+
| :math:`\ell_1` | :math:`\|W\|_{1,1} = \sum_{i=1}^m\sum_{j=1}^{K}|W_{i,j}|` |
962963
+----------------+----------------------------------------------------------------------------------+
963-
| :math:`\ell_2` | :math:`\frac{1}{2}\|W\|_F^2 = \frac{1}{2}\sum_{i=1}^n\sum_{j=1}^{K} W_{i,j}^2` |
964+
| :math:`\ell_2` | :math:`\frac{1}{2}\|W\|_F^2 = \frac{1}{2}\sum_{i=1}^m\sum_{j=1}^{K} W_{i,j}^2` |
964965
+----------------+----------------------------------------------------------------------------------+
965966
| `ElasticNet` | :math:`\frac{1 - \rho}{2}\|W\|_F^2 + \rho \|W\|_{1,1}` |
966967
+----------------+----------------------------------------------------------------------------------+

0 commit comments

Comments
 (0)