-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[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
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?