enable & expose ground distance power#60
Open
corybrunson wants to merge 4 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes minimal changes to the C++ to enable the use of the$q$ in
internal_pargument, which corresponds to the Wasserstein distance parameter designatedhelp(wasserstein_distance). It would resolve #47. In addition to C++ and R source code, the documentation and validation vignette are updated accordingly.While i think external source code should in general be modified only as needed for binding purposes, i think this change is justified by the companion journal article, which states that this parameter is available to users, i.e. the software was originally designed with it in mind. A natural use case is for statistical analysis packages that depend on phutil to be able to tune this parameter.
In a breaking change to the current version,
wasserstein_distance()deploysbottleneck_distance()only whenp == Inf && q == Inf; whenpis large, it proceeds with the internalwassersteinDistance()with a warning. The threshold for this warning isp >= 6, which is smaller than the currentp > 20, due to my lesson from experience that R may crash for certain pairs of small diagrams even with these values. We may want to replace the warning with an error, perhaps with a parameter that allows the user to override it; but at least the bottleneck deployment is more honest.I want to proceed cautiously with this upgrade, but i've experimented enough locally that i feel comfortable initiating it. : )