[scikit-learn] LASSO: Predicted values show negative correlation with observed values on random data

Martin Watzenboeck martin.watzenboeck at gmail.com
Wed Apr 3 07:17:13 EDT 2019


Hi Alex,

Thanks a lot for the answer! That does indeed explain this phenomenon.
Also, I know see that with my data I can get meaningful LASSO predictions
by tuning the alpha parameter.

Cheers,
Martin

Am Di., 2. Apr. 2019 um 21:33 Uhr schrieb Alexandre Gramfort <
alexandre.gramfort at inria.fr>:

> in your example with random data Lasso leads to coef_ of zeros so you get
> as prediction : np.mean(Y[train])
>
> you'll see the same phenomenon if you do:
>
> pred = np.r_[pred, np.mean(Y[train])]
>
> Alex
>
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20190403/7e1a25c3/attachment-0001.html>


More information about the scikit-learn mailing list