8000 DOC Added example comparing L1-based models to Lasso, ElasticNet and … · supersom/scikit-learn@c47dcbb · GitHub
[go: up one dir, main page]

Skip to content

Commit c47dcbb

Browse files
committed
DOC Added example comparing L1-based models to Lasso, ElasticNet and ARD docstrings and demonstrating ARD to ARD docstring [as in PR scikit-learn#30587]
1 parent 1a7363f commit c47dcbb

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

sklearn/linear_model/_bayes.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,9 +590,12 @@ class ARDRegression(RegressorMixin, LinearModel):
590590
>>> clf.predict([[1, 1]])
591591
array([1.])
592592
593-
- :ref:`sphx_glr_auto_examples_linear_model_plot_ard.py` demonstrates ARD Regression.
593+
- :ref:`sphx_glr_auto_examples_linear_model_plot_ard.py` demonstrates ARD
594+
Regression.
594595
595-
- :ref:`sphx_glr_auto_examples_linear_model_plot_lasso_and_elasticnet.py` showcases ARD Regression alongside Lasso and Elastic-Net for sparse, correlated signals, in the presence of noise.
596+
- :ref:`sphx_glr_auto_examples_linear_model_plot_lasso_and_elasticnet.py`
597+
showcases ARD Regression alongside Lasso and Elastic-Net for sparse,
598+
correlated signals, in the presence of noise.
596599
"""
597600

598601
_parameter_constraints: dict = {

sklearn/linear_model/_coordinate_descent.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,9 @@ class ElasticNet(MultiOutputMixin, RegressorMixin, LinearModel):
876876
>>> print(regr.predict([[0, 0]]))
877877
[1.451]
878878
879-
- :ref:`sphx_glr_auto_examples_linear_model_plot_lasso_and_elasticnet.py` showcases ElasticNet alongside Lasso and ARD Regression for sparse signal recovery in the presence of noise and feature correlation.
879+
- :ref:`sphx_glr_auto_examples_linear_model_plot_lasso_and_elasticnet.py`
880+
showcases ElasticNet alongside Lasso and ARD Regression for sparse signal
881+
recovery in the presence of noise and feature correlation.
880882
"""
881883

882884
# "check_input" is used for optimisation and isn't something to be passed
@@ -1307,7 +1309,10 @@ class Lasso(ElasticNet):
13071309
>>> print(clf.intercept_)
13081310
0.15
13091311
1310-
- :ref:`sphx_glr_auto_examples_linear_model_plot_lasso_and_elasticnet.py` compares Lasso with other L1-based regression models (ElasticNet and ARD Regression) for sparse signal recovery in the presence of noise and feature correlation.
1312+
- :ref:`sphx_glr_auto_examples_linear_model_plot_lasso_and_elasticnet.py`
1313+
compares Lasso with other L1-based regression models (ElasticNet and ARD
1314+
Regression) for sparse signal recovery in the presence of noise and feature
1315+
correlation.
13111316
13121317
"""
13131318

0 commit comments

Comments
 (0)
0