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] GW dictionary learning #319

Merged
merged 26 commits into from
Feb 11, 2022

Conversation

cedricvincentcuaz
Copy link
Collaborator

@cedricvincentcuaz cedricvincentcuaz commented Dec 8, 2021

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Motivation and context / Related issue

  • Added new features: (fused) gromov-wasserstein based linear dictionary learning.
    new functions/ new file:
    main:
  • ot.gromov.gromov_wasserstein_dictionary_learning
  • ot.gromov.gromov_wasserstein_linear_unmixing
  • ot.gromov.fused_gromov_wasserstein_dictionary_learning
  • ot.gromov.fused_gromov_wasserstein_linear_unmixing
  • examples.gromov.plot_gromov_wasserstein_dictionary_learning.py
    hidden:
  • gromov._cg_gromov_wasserstein_unmixing (required for main functions)
  • gromov._initialize_adam_optimizer (adam optimizer used for efficiently learn gw/fgw dictionaries )
  • gromov._adam_stochastic_updates (adam optimizer used for efficiently learn gw/fgw dictionaries )

added features to existing functions used in main new functions:

  • add a feature to gromov-wasserstein and fused gromov-wasserstein solvers to provide different initialization to the transport plan which will be optimized. (used in ot.gromov.gromov_wasserstein_linear_unmixing / ot.gromov.fused_gromov_wasserstein_linear_unmixing)

How has this been tested (if it applies)

dictionary learning functions tested in plot_gromov_wasserstein_dictionary_learning.py. Dependency with backend tested by providing either numpy or pytorch tensors as inputs.

Checklist

  • [unsure] The documentation is up-to-date with the changes I made.
  • I have read the CONTRIBUTING document.
  • [unsure] All tests passed, and additional code has been covered with new tests.

@cedricvincentcuaz cedricvincentcuaz changed the title gw dictionarylearning [MRG] gw dictionarylearning Dec 8, 2021
@rflamary rflamary changed the title [MRG] gw dictionarylearning [WIP] GW dictionary learning Dec 9, 2021
@codecov
Copy link

codecov bot commented Dec 9, 2021

Codecov Report

Merging #319 (aecd04a) into master (a5e0f0d) will increase coverage by 0.39%.
The diff coverage is 98.30%.

@@            Coverage Diff             @@
##           master     #319      +/-   ##
==========================================
+ Coverage   93.20%   93.59%   +0.39%     
==========================================
  Files          22       22              
  Lines        5250     5591     +341     
==========================================
+ Hits         4893     5233     +340     
- Misses        357      358       +1     

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.

thank you for the PR, here are a few comment about variable names and testing that should be taken into account

ot/gromov.py Outdated Show resolved Hide resolved
ot/gromov.py Outdated Show resolved Hide resolved
ot/gromov.py Outdated Show resolved Hide resolved
ot/gromov.py Outdated Show resolved Hide resolved
ot/gromov.py Show resolved Hide resolved
ot/gromov.py Outdated Show resolved Hide resolved
ot/gromov.py Outdated Show resolved Hide resolved
ot/gromov.py Outdated Show resolved Hide resolved
test/test_gromov.py Show resolved Hide resolved
@rflamary rflamary changed the title [WIP] GW dictionary learning [MRG] GW dictionary learning Feb 11, 2022
@rflamary rflamary merged commit 50c0f17 into PythonOT:master Feb 11, 2022
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