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

[MRG] Check if sample_domain have only unique domains indexes in check_*_domain #261

Merged
merged 13 commits into from
Oct 25, 2024

Conversation

apmellot
Copy link
Contributor

@apmellot apmellot commented Oct 24, 2024

In response to #16

@kachayev is that what you had in mind ?
Should check_X_y_domain and check_X_domain stay two separate functions?

A test should be added for this situation.

@kachayev
Copy link
Collaborator

Yes, Apolline, exactly!

Answering your question: check_X_y_domain and check_X_domain should stay separate as they are designed for different use cases/inputs. Their implementation, ideally, would re-use as much common functionality as possible, for sure, but that's, you know, in an ideal world :)

A few comments:

  • i think we need new allow_ parameter so that users can decide when this should or should not be enforced
  • it might be helpful to mention explicitly in the error message that the same domain should not be used both as source and as a target, otherwise it could be confusing

P.S. If I recall correctly, @rflamary had rather strong opinion around the indexing. I'm gonna let him to chime in here. Likely allow_ should be True by default ;)

Copy link
Collaborator

@rflamary rflamary left a comment

Choose a reason for hiding this comment

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

LGTM especially when keeping the default to True. This will allows us to set this parameter to DAestimators (by keeping the default to TRue) which can allow user to detect problems depending on their choice of numbering for domains in a future PR.

@antoinecollas antoinecollas changed the title Check if sample_domain have only unique domains indexes in check_*_domain [MRG] Check if sample_domain have only unique domains indexes in check_*_domain Oct 24, 2024
@antoinecollas antoinecollas merged commit 425d301 into scikit-adaptation:main Oct 25, 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.

4 participants