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

Alexandre Gramfort alexandre.gramfort at inria.fr
Tue Apr 2 15:33:02 EDT 2019


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20190402/a9d246ca/attachment.html>


More information about the scikit-learn mailing list