-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
[WIP] API: allow cross validation to work with partial_fit #11266
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
Open
stsievert
wants to merge
7
commits into
scikit-learn:main
Choose a base branch
from
stsievert:cross_val_score-fit
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Thanks. this can't possibly make it into v0.20 in my opinion. Indeed, it
would be great to be pinged after that release
|
This was referenced Jun 15, 2018
I think this is ready for review. On |
5 tasks
I'd like this to work better with repeated calls and the train/test split. That's where the main advantage comes from. |
This was referenced Jun 21, 2018
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
Addresses (but doesn't fix) #1626: "API Proposal: Genearlized Cross-Validation and Early Stopping". This PR only address early stopping on models that have
partial_fit
(#1626 (comment)), not addressing "when more computation doesn't improve the result." (#1626 (comment)).I will use this in dask/dask-searchcv#72. Briefly, I want to repeatedly use
cross_validate
with a specified number ofpartial_fit
calls.What does this implement/fix? Explain your changes.
This PR implements early stopping for cross validation when
partial_fit
is present. This requires that_fit_and_score
have apartial_fit
keyword argument that can either be a bool or an int that reflects the number of timesest.partial_fit
is called.partial_fit
keyword arg tocross_validate
, which relies on_fit_and_score
._fit_and_score
is called repeatedly.TODO
make work with pipelinesintegrate with GridSearchCV and RandomizedSearchCV