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

[WIP] documentation and warnings in (f)gw cg solvers for integer inputs #560

Merged
merged 3 commits into from
Nov 7, 2023

Conversation

cedricvincentcuaz
Copy link
Collaborator

Types of changes

  • Add note for integer inputs in the documentation of :gromov_wasserstein, gromov_wasserstein2, fused_gromov_wasserstein, fused_gromov_wasserstein2
  • Add warnings for integer inputs in : gromov_wasserstein, fused_gromov_wasserstein

Motivation and context / Related issue

How has this been tested (if it applies)

  • Add tests with integers in test_gromov: test_gromov_integer_warnings, test_fgw_integer_warnings

PR checklist

  • I have read the CONTRIBUTING document.
  • The documentation is up-to-date with the changes I made (check build artifacts).
  • All tests passed, and additional code has been covered with new tests.
  • I have added the PR and Issue fix to the RELEASES.md file.

Copy link

codecov bot commented Nov 5, 2023

Codecov Report

Merging #560 (3d8f4a5) into master (1ece2d8) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #560      +/-   ##
==========================================
+ Coverage   96.48%   96.49%   +0.01%     
==========================================
  Files          67       67              
  Lines       14773    14816      +43     
==========================================
+ Hits        14254    14297      +43     
  Misses        519      519              

@cedricvincentcuaz
Copy link
Collaborator Author

Hello @rflamary,

For GW (resp. FGW) solvers I set the type of the first variable $C_1$ (resp. $M$) as default type for the outputted transport plan. Do you think that it is enough ? Would it be better to make $T$ inherit the most precise type over all inputs ?
Some use cases: If $p$ and $q$ are not provided there will be instantiated based on this type so the transport plan will inherit it as $G_0 = pq^\top$. If $p$ or $q$ are provided as integers, $G_0$ would have int type so most likely would be a matrix of 0. But providing such marginals really does not make sense. Same argument if $G_0$ is provided by the user with an int type.

@rflamary
Copy link
Collaborator

rflamary commented Nov 7, 2023

Most precise type of the input is not possible to find easily because of the backend. Its OK to keep the type of M (if aailable) or C with a warning as long as it is clearly stated in thedocumentation.

@cedricvincentcuaz cedricvincentcuaz merged commit 1682b60 into PythonOT:master Nov 7, 2023
13 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.

2 participants