Skip to content

Commit de27031

Browse files
change docstring to make it lighter
1 parent 18378fb commit de27031

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

skglm/estimators.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -960,10 +960,9 @@ class SparseLogisticRegression(LinearClassifierMixin, SparseCoefMixin, BaseEstim
960960
The optimization objective for sparse Logistic regression is:
961961
962962
.. math::
963-
\frac{1}{n_{\text{samples}}} \sum_{i=1}^{n_{\text{samples}}}
964-
\log\left(1 + \exp(-y_i x_i^T w)\right)
965-
+ \alpha \cdot \left( \text{l1_ratio} \cdot \|w\|_1 +
966-
(1 - \text{l1_ratio}) \cdot \|w\|_2^2 \right)
963+
1 / n_"samples" \sum_{i=1}^{n_"samples"} log(1 + exp(-y_i xx x_i^T xx w))
964+
+ tt"l1_ratio" xx alpha ||w||_1
965+
+ (1 - tt"l1_ratio") xx alpha/2 ||w||_2 ^ 2
967966
968967
By default, ``l1_ratio=1.0`` corresponds to Lasso (pure L1 penalty).
969968
When ``0 < l1_ratio < 1``, the penalty is a convex combination of L1 and L2

0 commit comments

Comments
 (0)