-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG +1] Save predictions in diabetes_y_pred #8241
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
Merged
GaelVaroquaux
merged 1 commit into
scikit-learn:master
from
davidrobles:linear-regression-ypred
Feb 27, 2017
Merged
[MRG +1] Save predictions in diabetes_y_pred #8241
GaelVaroquaux
merged 1 commit into
scikit-learn:master
from
davidrobles:linear-regression-ypred
Feb 27, 2017
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jnothman
reviewed
Jan 28, 2017
# The coefficients | ||
print('Coefficients: \n', regr.coef_) | ||
# The mean squared error | ||
print("Mean squared error: %.2f" | ||
% np.mean((regr.predict(diabetes_X_test) - diabetes_y_test) ** 2)) | ||
% np.mean((diabetes_y_pred - diabetes_y_test) ** 2)) | ||
# Explained variance score: 1 is perfect prediction | ||
print('Variance score: %.2f' % regr.score(diabetes_X_test, diabetes_y_test)) |
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.
This is another prediction
Thanks! |
- No need for `regr.predict(diabetes_X_test)` to run multiple times. - Use `sklearn.metrics.mean_squared_error`. - Use `sklearn.metrics.r2_score`, instead of `regr.score`, which runs `regr.predict` again.
13d9d6e
to
7587daf
Compare
nelson-liu
approved these changes
Feb 27, 2017
LGTM, +1. |
@jnothman does this look good to you? |
LGTM. Merging. Thanks for the code contribution and the reviews. |
sergeyf
pushed a commit
to sergeyf/scikit-learn
that referenced
this pull request
Feb 28, 2017
- No need for `regr.predict(diabetes_X_test)` to run multiple times. - Use `sklearn.metrics.mean_squared_error`. - Use `sklearn.metrics.r2_score`, instead of `regr.score`, which runs `regr.predict` again.
Closed
herilalaina
pushed a commit
to herilalaina/scikit-learn
that referenced
this pull request
Mar 26, 2017
- No need for `regr.predict(diabetes_X_test)` to run multiple times. - Use `sklearn.metrics.mean_squared_error`. - Use `sklearn.metrics.r2_score`, instead of `regr.score`, which runs `regr.predict` again.
massich
pushed a commit
to massich/scikit-learn
that referenced
this pull request
Apr 26, 2017
- No need for `regr.predict(diabetes_X_test)` to run multiple times. - Use `sklearn.metrics.mean_squared_error`. - Use `sklearn.metrics.r2_score`, instead of `regr.score`, which runs `regr.predict` again.
Sundrique
pushed a commit
to Sundrique/scikit-learn
that referenced
this pull request
Jun 14, 2017
- No need for `regr.predict(diabetes_X_test)` to run multiple times. - Use `sklearn.metrics.mean_squared_error`. - Use `sklearn.metrics.r2_score`, instead of `regr.score`, which runs `regr.predict` again.
NelleV
pushed a commit
to NelleV/scikit-learn
that referenced
this pull request
Aug 11, 2017
- No need for `regr.predict(diabetes_X_test)` to run multiple times. - Use `sklearn.metrics.mean_squared_error`. - Use `sklearn.metrics.r2_score`, instead of `regr.score`, which runs `regr.predict` again.
paulha
pushed a commit
to paulha/scikit-learn
that referenced
this pull request
Aug 19, 2017
- No need for `regr.predict(diabetes_X_test)` to run multiple times. - Use `sklearn.metrics.mean_squared_error`. - Use `sklearn.metrics.r2_score`, instead of `regr.score`, which runs `regr.predict` again.
maskani-moh
pushed a commit
to maskani-moh/scikit-learn
that referenced
this pull request
Nov 15, 2017
- No need for `regr.predict(diabetes_X_test)` to run multiple times. - Use `sklearn.metrics.mean_squared_error`. - Use `sklearn.metrics.r2_score`, instead of `regr.score`, which runs `regr.predict` again.
lemonlaug
pushed a commit
to lemonlaug/scikit-learn
that referenced
this pull request
Jan 6, 2021
- No need for `regr.predict(diabetes_X_test)` to run multiple times. - Use `sklearn.metrics.mean_squared_error`. - Use `sklearn.metrics.r2_score`, instead of `regr.score`, which runs `regr.predict` again.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the e
2E17
xisting code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
regr.predict(diabetes_X_test)
to run multiple times.sklearn.metrics.mean_squared_error
.sklearn.metrics.r2_score
, instead ofregr.score
, whichruns
regr.predict
again.