This file contains 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
@chkoar, thanks for your reply. I tried adding tests, but there are few things I'm struggling with.
I edited the test_iht_init test function to test initialization with several estimators, because i made a similar error in my previous PR. But use of sklearn's all_estimators raised a ModuleNotFoundError: No module named 'Cython' error. Should I just skip this edit?
Test to check reproducibility which should fail for current master branch, passes when dataset is small or estimator is simple. I don't know if there is any standard, simpler way to test reproducibility.
If we don't do the coarse-parallelism part of point 3, which is more of an enhancement than a fix, we could easily check that estimator has n_jobs equal to the one provided to constructor of InstanceHardnessThreshold. But doing this seems to make good performance improvement. Here is a gist that compares speed. I'm not sure how to write tests for performance improvements.
I should probably mention this is my first ever attempt at writing tests in a principled way using a library. I tried looking at tests of this repo and sklearn's, but honestly feel bit overwhelmed. Any pointer would be really appreciated. Thanks.
So I merge the change with master. I remove the part which was setting n_jobs for the underlying estimator. This is now better managed in joblib since they worked on over-subscription and nested parallelism. For the rest I like the refactoring. So let see if the tests are passing.
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.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.