Skip to content

[WIP] [clean version] DomainAwareNet supports regression and binary classification#351

Open
vloison wants to merge 11 commits intoscikit-adaptation:mainfrom
vloison:deepregnet2
Open

[WIP] [clean version] DomainAwareNet supports regression and binary classification#351
vloison wants to merge 11 commits intoscikit-adaptation:mainfrom
vloison:deepregnet2

Conversation

@vloison
Copy link
Copy Markdown
Contributor

@vloison vloison commented Sep 23, 2025

DomainAwareNet implements a classifier. The goal is to implement dual classification and regression, too.

To do so, I replaced DomainAwareNet with a mother class _DomainAwareNet and two classes DomainAwareNetRegressor and DomainNetClassifier that inherit from _DomainAwareNet. Arthur added a class DomainNetBinaryClassifier, which follows the same principle.

Done:

  • Separate four classes.
  • Mark DomainAwareNet as deprecated.
  • Replace calls to DomainAwareNet by calls to DomainAwareNetClassifier in the module.

To do:

a script to try DomainAwareNetRegressor and DomainAwareNetDualClassifier

@vloison vloison changed the title [WIP] DomainAwareNet supports regression and binary classificaition [WIP] [clean version] DomainAwareNet supports regression and binary classification Sep 23, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 23, 2025

Codecov Report

❌ Patch coverage is 93.81443% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.77%. Comparing base (c750dde) to head (3064a4e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #351      +/-   ##
==========================================
- Coverage   95.89%   94.77%   -1.12%     
==========================================
  Files          64       64              
  Lines        7087     7255     +168     
==========================================
+ Hits         6796     6876      +80     
- Misses        291      379      +88     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread skada/deep/base.py
nonlin = _identity
elif nonlin == 'auto':
nonlin = _infer_predict_nonlinearity(self)
if not callable(nonlin):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It should be a elif no?

Comment thread skada/deep/base.py
"""
loss = super().get_loss(y_pred, y_true, X, *args, **kwargs)

if "sample_weight" in X and X["sample_weight"] is not None:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just need to test with sample_weight for the test coverage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants