Skip to content
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

Update MyModelWrapper so that sklearn recognizes as a classifier. #2751

Merged
merged 4 commits into from
Feb 22, 2024

Conversation

chris-santiago
Copy link
Contributor

Update MyModelWrapper so that sklearn recognizes as a classifier.

Reference Issues/PRs

Fixes #2750

What does this implement/fix? Explain your changes.

Adds/sets the _estimator_type to "classifier" for the MyModelWrapper class that wraps classification models within the DeepcheckScorer class. This ensures that scikit-learn treats wrapper as a classifier and does not raise a ValueError when calling scorer with predict_proba method.

Any other comments?


Thanks for contributing a pull request! Please ensure you have taken a look at
the contribution guidelines: https://github.com/deepchecks/deepchecks/blob/main/CONTRIBUTING.rst

Update `MyModelWrapper` so that sklearn recognizes as a classifier.
@chris-santiago chris-santiago requested a review from a team as a code owner February 16, 2024 21:24
@CLAassistant
Copy link

CLAassistant commented Feb 16, 2024

CLA assistant check
All committers have signed the CLA.

@noamzbr noamzbr added the feature Feature update or code change to the package label Feb 22, 2024
@noamzbr noamzbr enabled auto-merge (squash) February 22, 2024 11:36
@noamzbr noamzbr merged commit 24ae344 into deepchecks:main Feb 22, 2024
20 checks passed
@noamzbr noamzbr added bug and removed feature Feature update or code change to the package labels Feb 22, 2024
@noamzbr
Copy link
Collaborator

noamzbr commented Feb 22, 2024

@chris-santiago thanks for catching and fixing this!

@noamzbr
Copy link
Collaborator

noamzbr commented Feb 22, 2024

@all-contributors add @chris-santiago for code

Copy link
Contributor

@noamzbr

I've put up a pull request to add @chris-santiago! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] MyModelWrapper is incorrectly interpreted as "Regressor" for classification metrics
3 participants