-
-
Notifications
You must be signed in to change notification settings - Fork 26.4k
[MRG] Bayesian regression model dtype consistency #9087
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<
8000
/h2>
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
Henley13
changed the title
Bayesian regression model dtype consistency
[WIP] Bayesian regression model dtype consistency
Jun 9, 2017
Copy link
Member
The tests are failing.
Henley13
changed the title
[WIP] Bayesian regression model dtype consistency
[MRG] Bayesian regression model dtype consistency
Jun 23, 2017
Copy link
Contributor
Author
@GaelVaroquaux Ping
raghavrv
approved these changes
Jun 28, 2017
Copy link
Member
raghavrv
left a comment
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.
Thanks! This looks good to me, pending minor comments. :)
assert X.dtype == dtype
assert model.coef_.dtype == X.dtype
assert y_mean.dtype == X.dtype
assert y_std.dtype == X.dtype
Copy link
Member
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.
could you also add a line testing dtype of predict?
ard_64.fit(X_64, y_64)
assert_array_almost_equal(br_32.coef_, br_64.coef_, decimal=5)
assert_array_almost_equal(ard_32.coef_, ard_64.coef_, decimal=5)
Copy link
Member
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.
same here too. could you test it for the output of predict too?
massich
approved these changes
Jun 28, 2017
Copy link
Contributor
massich
left a comment
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.
LGTM
Copy link
Member
Can you please address the comments and fix the merge conflicts? Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
|
The tests are failing. |
|
@GaelVaroquaux Ping |
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.
Thanks! This looks good to me, pending minor comments. :)
| assert X.dtype == dtype | ||
| assert model.coef_.dtype == X.dtype | ||
| assert y_mean.dtype == X.dtype | ||
| assert y_std.dtype == X.dtype |
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.
could you also add a line testing dtype of predict?
| ard_64.fit(X_64, y_64) | ||
|
|
||
| assert_array_almost_equal(br_32.coef_, br_64.coef_, decimal=5) | ||
| assert_array_almost_equal(ard_32.coef_, ard_64.coef_, decimal=5) |
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.
same here too. could you test it for the output of predict too?
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.
LGTM
|
Can you please address the comments and fix the merge conflicts? Thanks! |
Reference Issue
Works on #11000
What does this implement/fix? Explain your changes.
Avoids Bayesian Regression to aggressively cast the data to np.float64 when np.float32 is supplied.
Any other comments?