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] fix predict_proba for deep method #247

Merged
merged 12 commits into from
Oct 24, 2024
Merged

Conversation

tgnassou
Copy link
Collaborator

The predict_proba of deep method was choosing the nonlin attributes by looking at criterion attribute of the solvers. The DomainAwareNet has a DomainAwareCriterion as criterion. We should choose the nonlin base on criterion.base_criterion. This PR does that.

@antoinecollas
Copy link
Collaborator

antoinecollas commented Oct 4, 2024

Right now, it's not possible to do classification with only two classes in skada.deep, see #249 .
Thus, we should only check if criterion is CrossEntropyLoss (and not BCELoss or BCEWithLogitsLoss).

@antoinecollas
Copy link
Collaborator

antoinecollas commented Oct 4, 2024

I added a test that checks when criterion is CrossEntropyLoss. I have no idea how to test the other cases which return _identity.

Copy link
Contributor

@agramfort agramfort left a comment

Choose a reason for hiding this comment

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

looks a bit too magical for me...

@rflamary rflamary changed the title [TO_REVIEW] fix predict_proba for deep method [MRG] fix predict_proba for deep method Oct 24, 2024
@rflamary rflamary merged commit bebc019 into scikit-adaptation:main Oct 24, 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.

5 participants