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

[FEAT] Add fugw interface #83

Merged
merged 22 commits into from
Jul 2, 2024

Conversation

pbarbarant
Copy link
Collaborator

@pbarbarant pbarbarant commented May 6, 2024

Solves #77 .

Added:

  • Fugw dense wrapper
  • Coarse-to-fine wrapper
  • Unit tests
  • Docstrings
  • Documentation

@pbarbarant pbarbarant marked this pull request as ready for review May 6, 2024 20:07
Copy link
Contributor

@bthirion bthirion left a comment

Choose a reason for hiding this comment

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

LGTM otherwise.

self,
X,
Y,
segmentation,
Copy link
Contributor

Choose a reason for hiding this comment

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

sklearn types estimators tend to mvoe all parameters (beyond X,Y) to the builder and have a very homgeneous fit(X,Y) API. Could we at least get closer to it ?

Copy link
Contributor

Choose a reason for hiding this comment

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

We should have a discussion on the API...

def transform(
self,
X,
device="auto",
Copy link
Contributor

Choose a reason for hiding this comment

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

same point here.

@bthirion
Copy link
Contributor

Can you fix the CI ?

@pbarbarant
Copy link
Collaborator Author

Can you fix the CI ?

Done!

Copy link
Contributor

@bthirion bthirion left a comment

Choose a reason for hiding this comment

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

LGTM overall, but we need to agree on the API.

self,
X,
Y,
segmentation,
Copy link
Contributor

Choose a reason for hiding this comment

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

We should have a discussion on the API...

----------
X : ndarray of shape (n_samples, n_features)
Source features
id_reg: float, in the [0, 1] interval, defaults to 0
Copy link
Contributor

Choose a reason for hiding this comment

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

these 2 parameters should be specified at the class creation step I think.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree that currently, it aligns with the FUGW API, where initialization adheres to the BaseMapping class:

class BaseMapping:
    def __init__(
        self,
        alpha=0.5,
        rho=1,
        eps=1e-2,
        reg_mode="joint",
        divergence="kl",
    ):

Adopting a more sklearn-like approach could be advantageous, yet I haven't explored it in detail.

@pbarbarant
Copy link
Collaborator Author

OK, after digging into the sklearn API I see what you mean.

@bthirion
Copy link
Contributor

We should probably discuss how we move forward with this. This could well be addressed in different PRs.

@emdupre
Copy link
Collaborator

emdupre commented Jun 25, 2024

I'll be out-of-office for a bit this summer, but if the timing lines up -- and if it would be useful to have me participate -- happy to have a discussion on the API !

@pbarbarant
Copy link
Collaborator Author

I'll be out-of-office for a bit this summer, but if the timing lines up -- and if it would be useful to have me participate -- happy to have a discussion on the API !

Sure! 🚀

@pbarbarant
Copy link
Collaborator Author

We should probably discuss how we move forward with this. This could well be addressed in different PRs.

The API design has been fixed.

Copy link
Contributor

@bthirion bthirion left a comment

Choose a reason for hiding this comment

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

The change LGTM.

@pbarbarant
Copy link
Collaborator Author

Feel free to merge whenever you want.

Copy link
Contributor

@bthirion bthirion left a comment

Choose a reason for hiding this comment

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

LGTM so far. Is this ready for merge ?

@pbarbarant
Copy link
Collaborator Author

pbarbarant commented Jul 2, 2024

LGTM so far. Is this ready for merge ?

Yes it is 👍

Copy link
Contributor

@bthirion bthirion left a comment

Choose a reason for hiding this comment

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

LGTM.

@pbarbarant
Copy link
Collaborator Author

LGTM.

I don't have maintainer access, can you merge it ?

@bthirion bthirion merged commit 63ae442 into Parietal-INRIA:main Jul 2, 2024
4 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.

3 participants