Skip to content

Fix ImportanceWeightedScorer compatibility with deep learning models #232

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 3 commits into from
Sep 11, 2024

Conversation

YanisLalou
Copy link
Collaborator

The ImportanceWeightedScorer was raising a TypeError when used with deep learning models. The error occurred because the scorer was trying to pass the allow_source parameter to the predict_proba method, which is not supported by deep learning models.

Changes:

  1. Modified the _score method in the ImportanceWeightedScorer class to handle both scikit-learn estimators and deep learning models.
  2. Updated the scorer tests.

@antoinecollas antoinecollas merged commit 35a9a0e into scikit-adaptation:main Sep 11, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants