-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
MRG FIX for iid weighting in grid-search #1731
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
@@ -146,7 +146,7 @@ estimator during the construction and exposes an estimator API:: | |||
>>> clf.fit(X_digits[:1000], y_digits[:1000]) # doctest: +ELLIPSIS | |||
GridSearchCV(cv=None,... | |||
>>> clf.best_score_ | |||
0.988991985997974 | |||
0.98899999999999999 |
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.
We will get rounding errors: computers have finite precisions. We cannot expect all platform to round stuff exactly the same way at the 17th place, can we? I think we should expect:
0.9889999999999... # doctest: +ELLIPSIS
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.
Ok, then I'll change all the tests in the file...
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.
The other numbers in the file seemed not to be periodic, so I kept them.
That looks good. Maybe @agramfort can you check this fix? I think you were the original author of the iid flag. |
rebased to fix merging trouble |
X, y = make_blobs(centers=[[0, 0], [1, 0], [0, 1], [1, 1]], random_state=0, | ||
cluster_std=0.1, shuffle=False, n_samples=80) | ||
# split dataset into two folds that are not iid | ||
# first on contains data of all 4 blobs, second only from two. |
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.
typo on=one
This all looks well to me and the test is good too. it's ready for merge, right? :) |
Yes, should be good. I agree with @ogrisel that it would be nice to have @agramfort's 👍 but I'm not sure he is available / has time. |
merged by rebase after fixing the typo. |
Thanks :) |
This is a fix for the iid weighting in GridSearchCV. It could be that I screwed this up before, but didn't notice as there was no test.