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

Feature/check marginals convergence #44

Merged
merged 4 commits into from
Oct 28, 2021

Conversation

michalk8
Copy link
Collaborator

Check if marginals are satisfied and whether we've reached max. number of iterations in FGW.
@zoepiran let me know if the warning/error messages are informative enough (feel free to improve them)
closes #40 #43

@michalk8 michalk8 added the enhancement New feature or request label Oct 28, 2021
@michalk8 michalk8 added this to the v1.0.0 milestone Oct 28, 2021
@michalk8 michalk8 self-assigned this Oct 28, 2021
@@ -59,7 +59,7 @@ def matrix(self) -> jnp.array:
"""Transport matrix."""
if self._transport is None:
raise RuntimeError("Not fitted.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe "Valid transportation map was not found." / "No valid transportation map found." ?

Copy link
Collaborator

@zoepiran zoepiran left a comment

Choose a reason for hiding this comment

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

Looks great :) maybe modify one error message as mentioned.

@michalk8 michalk8 merged commit 32a37a3 into dev Oct 28, 2021
@michalk8 michalk8 deleted the feature/check-marginals-convergence branch October 28, 2021 21:52
MUCDK pushed a commit that referenced this pull request Jan 17, 2022
* Add warning if not converged

* Add check for marginals

* Fix tests

* Update error msg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Raise an exception if marginals not satisfied
2 participants