8000 [MRG] Bayesian regression model dtype consistency by Henley13 · Pull Request #9087 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

Conversation< 8000 /h2>
@Henley13
Copy link
Contributor
@Henley13 Henley13 commented Jun 9, 2017

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?

@Henley13 Henley13 changed the title Bayesian regression model dtype consistency [WIP] Bayesian regression model dtype consistency Jun 9, 2017
@GaelVaroquaux
Copy link
Member

The tests are failing.

@Henley13 Henley13 changed the title [WIP] Bayesian regression model dtype consistency [MRG] Bayesian regression model dtype consistency Jun 23, 2017
@Henley13
Copy link
Contributor Author

@GaelVaroquaux Ping

Copy link
Member
@raghavrv raghavrv left a 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

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

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?

Copy link
Contributor
@massich massich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@amueller
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

0