-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
GaussianProcess batch predict fail on py3 #7329
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
Closed
zhengruifeng opened this issue
Sep 2, 2016
· 3 comments
· Fixed by #7330 · May be fixed by ccphillippi/scikit-learn#1
Closed
GaussianProcess batch predict fail on py3 #7329
zhengruifeng opened this issue
Sep 2, 2016
· 3 comments
· Fixed by #7330 · May be fixed by ccphillippi/scikit-learn#1
Comments
Duplicate of #6483 |
@nelson-liu Thanks. I will close this issue and pr. |
@nelson-liu Although it will be deprecated in (0.18), I think this PR may be useful before removal of GaussianProcess. So I reopen this PR. |
ccphillippi
added a commit
to ccphillippi/scikit-learn
that referenced
this issue
Sep 4, 2016
Fixes scikit-learn#7329 and scikit-learn#6483 I realize this is deprecated, but in case you're still interested in a quick bugfix, my understanding is that this was previously a silent bug even in Python 2.7. ``` import numpy as np def check_mse(n_eval, batch_size): y, MSE = np.zeros(n_eval), np.zeros(n_eval) for k in range(max(1, n_eval / batch_size)): batch_from = k * batch_size batch_to = min([(k + 1) * batch_size + 1, n_eval + 1]) print batch_from, batch_to def check_mse_fixed(n_eval, batch_size): y, MSE = np.zeros(n_eval), np.zeros(n_eval) for k in range(int(n_eval / float(batch_size) + 0.5)): batch_from = k * batch_size batch_to = min([(k + 1) * batch_size + 1, n_eval + 1]) print batch_from, batch_to check_mse(8, 3) print check_mse_fixed(8, 3) ``` Python 2.7 output: ``` 0 4 3 7 0 4 3 7 6 9 ``` Note 8 corresponds to the sample size so the current version (if converted to an int) would miss the last few samples.
jnothman
pushed a commit
that referenced
this issue
Oct 6, 2016
amueller
pushed a commit
to amueller/scikit-learn
that referenced
this issue
Oct 14, 2016
…ikit-learn#7330) * fix batch * add test for eval_MSE
Sundrique
pushed a commit
to Sundrique/scikit-learn
that referenced
this issue
Jun 14, 2017
…ikit-learn#7330) * fix batch * add test for eval_MSE
paulha
pushed a commit
to paulha/scikit-learn
that referenced
this issue
Aug 19, 2017
…ikit-learn#7330) * fix batch * add test for eval_MSE
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Description
GaussianProcess batch predict fail on py3 due to range(float)
Steps/Code to Reproduce
Expected Results
No error is thrown.
Actual Results
Versions
scikit-learn (0.17.1)
Python 3.5.2
The text was updated successfully, but these errors were encountered: