-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG +1] DOC - add example to cross_val_predict and cross_val_score #6446
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
Conversation
>>> X = diabetes.data[:150] | ||
>>> y = diabetes.target[:150] | ||
>>> lasso = linear_model.Lasso() | ||
>>> print(cross_val_predict(lasso, X, y)[:5]) # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd remove the [:5] and use ELLIPSIS
besides LGTM |
What is LGTM? I put the :5 otherwise the output would be to long. But I'll change it. You mean only ELLIPSIS? besides LGTM — |
LGTM =looks good to me. Generally signifies reviewer approval. On Wed, Feb 24, 2016, 1:45 PM Alejandro Correa Bahnsen <
|
this looks good to me (after fixing the changes @agramfort suggested) |
I adjust the output of cross_val_predict to be saved in y_pred (similar as https://github.com/scikit-learn/scikit-learn/blob/51a765a/sklearn/cross_decomposition/pls_.py#L575) |
LGTM |
Guys, what is the next step? |
LGTM. |
@albahnsen Could you rebase on top of master and resolve the conflicts please ? |
Guys I'm not sure if I did it correctly. |
hmm it doesn't seem like you did. you should do the following:
Now, you want to put your changes on top of your local master branch (which is now a copy of scikit-learn's master branch)
|
df30eeb
to
c1f3847
Compare
You did it, thanks @albahnsen. |
…cikit-learn#6446) * add example to cross_val_predict and cross_val_score * fix output of cross_val_predict * add example to cross_val_predict and cross_val_score * fix output of cross_val_predict * fix rebase
…cikit-learn#6446) * add example to cross_val_predict and cross_val_score * fix output of cross_val_predict * add example to cross_val_predict and cross_val_score * fix output of cross_val_predict * fix rebase
Add example code to the cross_val_predict and cross_val_score functions.
Simply load diabetes dataset and using a lasso model show how both functions work.