Skip to content

DOC Add link to plot_lasso_and_elasticnet.py example in linear model … #30585

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

Closed
wants to merge 1 commit into from

Conversation

marouaneaka
Copy link

@marouaneaka marouaneaka commented Jan 5, 2025

…lasso and elastic net

Reference Issues/PRs

What does this implement/fix? Explain your changes.

Fixes #26927 modified only Lasso and elastic net classes directly into the examples section

Any other comments?

Copy link

github-actions bot commented Jan 5, 2025

❌ Linting issues

This PR is introducing linting issues. Here's a summary of the issues. Note that you can avoid having linting issues by enabling pre-commit hooks. Instructions to enable them can be found here.

You can see the details of the linting issues under the lint job here


ruff

ruff detected issues. Please run ruff check --fix --output-format=full . locally, fix the remaining issues, and push the changes. Here you can see the detected issues. Note that the installed ruff version is ruff=0.5.1.


sklearn/linear_model/_coordinate_descent.py:851:1: W293 Blank line contains whitespace
    |
849 |     SGDClassifier : Implements logistic regression with elastic net penalty
850 |         (``SGDClassifier(loss="log_loss", penalty="elasticnet")``).
851 |     
    | ^^^^ W293
852 |     Notes
853 |     -----
    |
    = help: Remove whitespace from blank line

sklearn/linear_model/_coordinate_descent.py:862:1: W293 Blank line contains whitespace
    |
860 |     If so, then additionally check whether the dual gap is smaller than `tol` times
861 |     :math:`||y||_2^2 / n_{\text{samples}}`.
862 |     
    | ^^^^ W293
863 |     For an example showcasing Elastic-Net alongside Lasso and ARDRegression for sparse 
864 |     signal recovery in the presence of noise and feature correlation, see:
    |
    = help: Remove whitespace from blank line

sklearn/linear_model/_coordinate_descent.py:863:87: W291 Trailing whitespace
    |
861 |     :math:`||y||_2^2 / n_{\text{samples}}`.
862 |     
863 |     For an example showcasing Elastic-Net alongside Lasso and ARDRegression for sparse 
    |                                                                                       ^ W291
864 |     signal recovery in the presence of noise and feature correlation, see:
865 |     :ref:`sphx_glr_auto_examples_linear_model_plot_lasso_and_elasticnet.py`.
    |
    = help: Remove trailing whitespace

sklearn/linear_model/_coordinate_descent.py:1270:1: W293 Blank line contains whitespace
     |
1268 |     LassoLarsCV : Lasso least angle parameter algorithm by cross-validation.
1269 |     sklearn.decomposition.sparse_encode : Sparse coding array estimator.
1270 |     
     | ^^^^ W293
1271 |     For an example comparing Lasso with other L1-based regression models 
1272 |     (Elastic-Net and ARDRegression) on sparse and noisy data, see:  
     |
     = help: Remove whitespace from blank line

sklearn/linear_model/_coordinate_descent.py:1271:73: W291 Trailing whitespace
     |
1269 |     sklearn.decomposition.sparse_encode : Sparse coding array estimator.
1270 |     
1271 |     For an example comparing Lasso with other L1-based regression models 
     |                                                                         ^ W291
1272 |     (Elastic-Net and ARDRegression) on sparse and noisy data, see:  
1273 |     :ref:`sphx_glr_auto_examples_linear_model_plot_lasso_and_elasticnet.py`.
     |
     = help: Remove trailing whitespace

sklearn/linear_model/_coordinate_descent.py:1272:67: W291 Trailing whitespace
     |
1271 |     For an example comparing Lasso with other L1-based regression models 
1272 |     (Elastic-Net and ARDRegression) on sparse and noisy data, see:  
     |                                                                   ^^ W291
1273 |     :ref:`sphx_glr_auto_examples_linear_model_plot_lasso_and_elasticnet.py`.
     |
     = help: Remove trailing whitespace

Found 6 errors.
No fixes available (6 hidden fixes can be enabled with the `--unsafe-fixes` option).

Generated for commit: aa50ad6. Link to the linter CI: here

@marouaneaka marouaneaka closed this Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add links to examples from the docstrings and user guides
1 participant