-
-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Open
Description
Describe the issue linked to the documentation
model = make_pipeline(StandardScaler(), LassoCV(cv=20)).fit(X, y)
Optimizing Alpha for lasso involves data leakage because standard scaling is applied on X and y in one go, instant for each fold.
It is used in the example Selecting Lasso via cross-validation
https://scikit-learn.org/stable/auto_examples/linear_model/plot_lasso_model_selection.html
Suggest a potential alternative/fix
No response