MNT Common tests between KDTree and BallTree#16338
Merged
thomasjpfan merged 1 commit intoscikit-learn:masterfrom Feb 2, 2020
Merged
MNT Common tests between KDTree and BallTree#16338thomasjpfan merged 1 commit intoscikit-learn:masterfrom
thomasjpfan merged 1 commit intoscikit-learn:masterfrom
Conversation
rth
approved these changes
Jan 31, 2020
jeremiedbb
reviewed
Jan 31, 2020
Comment on lines
+72
to
+78
| @pytest.mark.parametrize('Cls', [KDTree, BallTree]) | ||
| @pytest.mark.parametrize("kernel", ['gaussian', 'tophat', 'epanechnikov', | ||
| 'exponential', 'linear', 'cosine']) | ||
| @pytest.mark.parametrize("h", [0.01, 0.1, 1]) | ||
| @pytest.mark.parametrize("rtol", [0, 1E-5]) | ||
| @pytest.mark.parametrize("atol", [1E-6, 1E-2]) | ||
| @pytest.mark.parametrize("breadth_first", [True, False]) |
Member
There was a problem hiding this comment.
This actually runs 288 tests ! is it reasonably fast ?
Contributor
Author
There was a problem hiding this comment.
On my local machine: 288 passed in 1.72s
Contributor
Author
There was a problem hiding this comment.
For comparison: the old test_kd_tree_kde uses loops inside and results in 18 passed in 0.67s. Doubling for balltree, we have like 0.4s overhead.
Member
There was a problem hiding this comment.
It should be fine. Thanks for checking.
thomasjpfan
approved these changes
Feb 2, 2020
Member
thomasjpfan
left a comment
There was a problem hiding this comment.
Thank you for the PR @VarIr !
thomasjpfan
pushed a commit
to thomasjpfan/scikit-learn
that referenced
this pull request
Feb 22, 2020
panpiort8
pushed a commit
to panpiort8/scikit-learn
that referenced
this pull request
Mar 3, 2020
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
More common tests between KDTree and BallTree. See also #15148 and #16110 (comment).
What does this implement/fix? Explain your changes.
From the previous PR by @rth :
Any other comments?
There might also be some overlap with
KernelDensity, which is not dealt with in this PR.For example,
compute_kernel_slow,test_kernel_density