Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Conversation

@danieltudosiu
Copy link
Contributor

Added the MMD Metric and required tests.

@Warvito for the tests I tried to create two normal distributions and the MMD metric resulted in a 0.3 value.

I have had a try with the code from torch-two-sample at different alphas bigger than 0 and they also return a non-zero value.

I also had a go at the original code from the alpha WGAN paper and it as well returns a non-zero value.

Given that MMD is a differentiable metric like SSIM should we also implement and test a loss?

Signed-off-by: Petru-Daniel Tudosiu <petru.daniel@tudosiu.com>
@danieltudosiu danieltudosiu linked an issue Dec 20, 2022 that may be closed by this pull request
@Warvito
Copy link
Collaborator

Warvito commented Dec 21, 2022

Thanks for implementing! I think just the metric is enough for now, Dan.

@danieltudosiu
Copy link
Contributor Author

Ok, then please review it and if you consider it ok merge it.

I have also included a transformation which can be seen as applying different kernels to the data such as gaussian or laplace or as in our publications the MedNet3D.

Copy link
Collaborator

@Warvito Warvito 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! I left a few comments regarding the docstrings, and there is a step that I think it might have a bug. could please check it, and "re-assign review needed" after done?

@danieltudosiu danieltudosiu requested a review from Warvito January 8, 2023 10:25
@Warvito Warvito merged commit cd7d30a into main Jan 8, 2023
@Warvito Warvito deleted the 105-add-maximum-mean-discrepancy-metric branch January 8, 2023 12:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Maximum Mean Discrepancy metric

3 participants