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

[TO-REVIEW] Add multi-domain Monge alignment and JCPOT Target shift method #180

Merged
merged 21 commits into from
Jul 19, 2024

Conversation

rflamary
Copy link
Collaborator

@rflamary rflamary commented Apr 30, 2024

Adds a multi domain Monge alignement Adapter to SKADA that does the following

  1. compte a barycenter of all sources (Gaussian assumtion)
  2. Map all data to this barycenter with the clase form
  3. At test time it maps all data (form target or source) to the barycenter when calling tranform

Also implement the multisource JCPOT taregt shift method (that should also work for only one source)

Remain to be done

  • Proper documentation
  • pipeline function wit adapter
  • Add references
  • Implement JCPOT

@rflamary rflamary changed the title [WIP] ADd multi-domain Monge alignment [WIP] Add multi-domain Monge alignment Apr 30, 2024
Copy link

codecov bot commented Apr 30, 2024

Codecov Report

Attention: Patch coverage is 98.03922% with 2 lines in your changes missing coverage. Please review.

Project coverage is 97.02%. Comparing base (fb26ff5) to head (df77630).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #180      +/-   ##
==========================================
+ Coverage   97.01%   97.02%   +0.01%     
==========================================
  Files          54       54              
  Lines        5319     5419     +100     
==========================================
+ Hits         5160     5258      +98     
- Misses        159      161       +2     

# %% Multisource and taregt data


def get_multidomain_data(
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should go to toy datasets, right?

skada/_mapping.py Outdated Show resolved Hide resolved
-------
X_t : array-like, shape (n_samples, n_components)
The data transformed to the target subspace.
y_t : array-like, shape (n_samples,)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Only X_adapt is returned.


check_consistent_length(arrays)

domain_idx = extract_domains_indices(sample_domain, False)
Copy link
Collaborator

Choose a reason for hiding this comment

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

We need to make boolean into a (forced-)named argument (I guess not the part of this PR)

@rflamary rflamary changed the title [WIP] Add multi-domain Monge alignment [WIP] Add multi-domain Monge alignment and JCPOT Tarnget shift mlethod May 3, 2024
@rflamary rflamary changed the title [WIP] Add multi-domain Monge alignment and JCPOT Tarnget shift mlethod [WIP] Add multi-domain Monge alignment and JCPOT Target shift method May 3, 2024
@rflamary rflamary added the algorithm Implementation or improvements of the DA methods label May 3, 2024
@rflamary rflamary changed the title [WIP] Add multi-domain Monge alignment and JCPOT Target shift method [TO-REVIEW] Add multi-domain Monge alignment and JCPOT Target shift method Jul 15, 2024
@rflamary rflamary requested a review from tgnassou July 15, 2024 14:21
@tgnassou tgnassou merged commit ce1d60c into main Jul 19, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
algorithm Implementation or improvements of the DA methods
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants