- Notifications
You must be signed in to change notification settings - Fork 68
Allow specifying custom seed for cross-validation #707
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
Add a new `cv_seed` keyword argument to `Learner.cross_validate()` method with the same default value as before.
- This field should be in the "Input" section. - Add it to the documentation. - Show the seed in the experiment log.
- Add a new test generator that sets a custom seed and then checks whether the folds generated from inside SKLL match expected folds, for both classifiers and regressors. - This test requires computing the expected folds which we were already doing for another, already existing test. So, I factored that code out into a utility function in `tests/utils.py`.
- Also add tests for the voting learners side in the same vein as the regular learners using the same utility function.
- `test_voting_learners_api_5.py` now takes 2x longer due to the addition of a new boolean field so let's move it to a different test partition which is much shorter than others.
Codecov Report
@@ Coverage Diff @@ ## main #707 +/- ## ========================================== + Coverage 96.89% 96.92% +0.03% ========================================== Files 63 63 Lines 9199 9263 +64 ========================================== + Hits 8913 8978 +65 + Misses 286 285 -1
Continue to review full report at Codecov.
|
Frost45 left a comment
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.
Looks great @desilinguist! A few minor suggestions.
| @Frost45 please take a look at the changes! |
Frost45 left a comment
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.
Looks great @desilinguist! Thank you for doing this! 🙏🏼
Co-authored-by: Sanjna Kashyap <20379363+Frost45@users.noreply.github.com>
This PR closes #593.
cv_seedkeyword argument to theLearner.cross_validate()method with the same default value as before.cv_seedconfiguration file field in the “Input” section. Also, show the seed in the experiment log.tests/utils.py.cv_seedfor voting learners too.test_voting_learners_api_5.pynow takes 2x longer due to the addition of a new boolean field so let's move it to a different test partition which is much shorter than others.