-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
ENH check_is_fitted calls __is_fitted__ if available #20657
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
9a624fc
ENH check_is_fitted calls __is_fitted__ if available
adrinjalali 54e5efd
fix description
adrinjalali 5076b69
simplify validation
adrinjalali 544ec0f
add whats_new
adrinjalali 17853da
fix changelog format
adrinjalali a93426f
test pipeline and check_estimator
adrinjalali 64c6a96
rename to __sk_is_fitted__
adrinjalali 552fec1
use LogisticRegression in pipeline instead
adrinjalali f59e95e
try a fake estimator
adrinjalali 282e23b
change from method to property
adrinjalali 1c4e0a1
Merge remote-tracking branch 'upstream/main' into pipeline-check
adrinjalali bb72f97
address Guillaume's comments
adrinjalali 9552776
FunctionTransformer uses a class attribute
adrinjalali c9384bf
Revert "FunctionTransformer uses a class attribute"
adrinjalali c0a84dd
Revert "change from method to property"
adrinjalali d30ba5d
Olivier's comments
adrinjalali 89d41cb
rename to __sklearn_is_fitted__
adrinjalali 1b08447
fix import
adrinjalali File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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.
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.
The fact that we only check the last step of the pipeline is to be nice with users that have a currently working pipeline with their own custom stateless transformers that would fail the
check_is_fitted
check if we were to have this property call thischeck_is_fitted
on all steps?Or is there another reason?
In both cases it might be worth it to make that explicit in the inline 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.
@glemaitre 's script was checking for the first step, I thought it makes sense to do it for the last step. I'm agnostic on how we do it. I'll add a comment.