Skip to content

[TO_REVIEW] Enhancements to DomainAwareNet and Scorers to handle allow_source arg #258

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 7 commits into from
Oct 24, 2024

Conversation

YanisLalou
Copy link
Collaborator

@YanisLalou YanisLalou commented Oct 18, 2024

The most important changes include adding support for source domains in various methods and updating the scoring mechanism to accommodate these changes.

Enhancements to DomainAwareNet:

  • Added allow_source parameter to predict, predict_proba, and score methods to support source domains. (skada/deep/base.py) [1] [2] [3]
  • Modified check_X_domain usage in predict_proba and score methods to handle allow_source. (skada/deep/base.py) [1] [2]

Updates to testing and metrics:

  • Updated tests to include allow_source parameter in predictions. (skada/deep/tests/test_deep_scorer.py)
  • Removed commented-out scorer in tests. (skada/deep/tests/test_deep_scorer.py)
  • Updated _score method in metrics.py to handle allow_source parameter and removed outdated code. (skada/metrics.py) [1] [2] [3]
  • Added allow_source parameter to various scoring functions and ensured compatibility with deep estimators. (skada/metrics.py) [1] [2] [3] [4]

Copy link
Collaborator

@antoinecollas antoinecollas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add a test to check an error is raised when allow_source = False and positive sample_domain is provided to a deep model.

@antoinecollas antoinecollas merged commit 85b81d8 into scikit-adaptation:main Oct 24, 2024
3 of 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