Misc fixes for default-constructibility of our learners#144
Merged
timokau merged 6 commits intokiudee:masterfrom Jul 1, 2020
Merged
Misc fixes for default-constructibility of our learners#144timokau merged 6 commits intokiudee:masterfrom
timokau merged 6 commits intokiudee:masterfrom
Conversation
That will give some of the scikit-learn estimator API (such as set_params and get_params) for free.
Collaborator
Author
|
Removing the regularizer default overrides is a small breaking change (analogous to #142). |
Codecov Report
@@ Coverage Diff @@
## master #144 +/- ##
==========================================
+ Coverage 60.08% 60.11% +0.03%
==========================================
Files 116 116
Lines 7662 7668 +6
==========================================
+ Hits 4604 4610 +6
Misses 3058 3058
|
Collaborator
Author
|
Code coverage is only decreasing because of the |
kiudee
requested changes
Jul 1, 2020
Owner
kiudee
left a comment
There was a problem hiding this comment.
I found only a few minor spelling mistakes and wording problems.
Otherwise it looks good to merge.
Tuples are immutable and the scikit-learn estimator API requires estimator parameters to be immutable (to make cloning work properly). Since we do not use the parameters in a mutable way, this doesn't make a difference.
In the spirit of 2291f86.
Scikit-learn requires unmodified storage of estimator parameters. Instead, parameter validation and initialization should be deferred to fit, which we do here by moving it into the model creation.
Scikit-learn mandates that all estimator arguments should be stored in an instance attribute of the same name.
62474a1 to
217c838
Compare
Collaborator
Author
|
Thanks for the feedback, I addressed all your comments. Please have another look. |
kiudee
approved these changes
Jul 1, 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.
Description
Pulling out the changes of #116 that are ready for merge now. As I said in #116 (comment), this brings us very close to passing the "default-constructible" test. I think/hope that will be the highest hurdle for sklearn api compatibility.
Outstanding issues are the kernel-regularizers and scikit-learn/scikit-learn#17756.
Motivation and Context
See #116.
How Has This Been Tested?
Linters & tests.
Does this close/impact existing issues?
Impacts #116, but doesn't close it.
Types of changes
Checklist: