Skip to content

Commit b1619d0

Browse files
committed
DOC : update docstring of l1_ratio for E-Net CV classes
1 parent 67ab084 commit b1619d0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

sklearn/linear_model/coordinate_descent.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,7 @@ class ElasticNetCV(LinearModelCV, RegressorMixin):
13331333
13341334
Parameters
13351335
----------
1336-
l1_ratio : float, optional
1336+
l1_ratio : float or array of floats, optional
13371337
float between 0 and 1 passed to ElasticNet (scaling between
13381338
l1 and l2 penalties). For ``l1_ratio = 0``
13391339
the penalty is an L2 penalty. For ``l1_ratio = 1`` it is an L1 penalty.
@@ -1831,6 +1831,12 @@ class MultiTaskElasticNetCV(LinearModelCV, RegressorMixin):
18311831
For l1_ratio = 0 the penalty is an L1/L2 penalty. For l1_ratio = 1 it
18321832
is an L1 penalty.
18331833
For ``0 < l1_ratio < 1``, the penalty is a combination of L1/L2 and L2.
1834+
This parameter can be a list, in which case the different
1835+
values are tested by cross-validation and the one giving the best
1836+
prediction score is used. Note that a good choice of list of
1837+
values for l1_ratio is often to put more values close to 1
1838+
(i.e. Lasso) and less close to 0 (i.e. Ridge), as in ``[.1, .5, .7,
1839+
.9, .95, .99, 1]``
18341840
18351841
fit_intercept : boolean
18361842
whether to calculate the intercept for this model. If set

0 commit comments

Comments
 (0)