Skip to content

DOC ensures MultiTaskLasso passes numpydoc validation #21363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion maint_tools/test_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"MultiLabelBinarizer",
"MultiTaskElasticNet",
"MultiTaskElasticNetCV",
"MultiTaskLasso",
"MultiTaskLassoCV",
"OrthogonalMatchingPursuit",
"OrthogonalMatchingPursuitCV",
Expand Down
29 changes: 15 additions & 14 deletions sklearn/linear_model/_coordinate_descent.py
Original file line number Diff line number Diff line change
Expand Up @@ -2378,6 +2378,7 @@ def fit(self, X, y):
Returns
-------
self : object
Fitted estimator.

Notes
-----
Expand Down Expand Up @@ -2527,7 +2528,7 @@ class MultiTaskLasso(MultiTaskElasticNet):
If set to 'random', a random coefficient is updated every iteration
rather than looping over features sequentially by default. This
(setting to 'random') often leads to significantly faster convergence
especially when tol is higher than 1e-4
especially when tol is higher than 1e-4.

Attributes
----------
Expand Down Expand Up @@ -2563,6 +2564,19 @@ class MultiTaskLasso(MultiTaskElasticNet):

.. versionadded:: 1.0

See Also
--------
Lasso: Linear Model trained with L1 prior as regularizer (aka the Lasso).
MultiTaskLasso: Multi-task L1/L2 Lasso with built-in cross-validation.
MultiTaskElasticNet: Multi-task L1/L2 ElasticNet with built-in cross-validation.

Notes
-----
The algorithm used to fit the model is coordinate descent.

To avoid unnecessary memory duplication the X and y arguments of the fit
method should be directly passed as Fortran-contiguous numpy arrays.

Examples
--------
>>> from sklearn import linear_model
Expand All @@ -2574,19 +2588,6 @@ class MultiTaskLasso(MultiTaskElasticNet):
[0. 0.94592424]]
>>> print(clf.intercept_)
[-0.41888636 -0.87382323]

See Also
--------
MultiTaskLasso : Multi-task L1/L2 Lasso with built-in cross-validation
Lasso
MultiTaskElasticNet

Notes
-----
The algorithm used to fit the model is coordinate descent.

To avoid unnecessary memory duplication the X and y arguments of the fit
method should be directly passed as Fortran-contiguous numpy arrays.
"""

def __init__(
Expand Down