-
Notifications
You must be signed in to change notification settings - Fork 1
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
5 implement mmd #22
5 implement mmd #22
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few initial comments whilst I wait for some things to run 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far! Some fairly minor changes requested in comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great, a couple of very minor comments then happy to merge without re-review.
Have run the following on my machine and returns a very small value for mmd (1.5625e-05
) with rbf kernel. I imagine this is somewhat expected even with fairly large drop sizes?
from modsim2.data.loader import DMPair
metric_config = {'mmd_rbf': {'function': 'mmd', 'arguments': {'embedding_name': 'matrix', 'kernel_name': 'rbf'}}}
dmpair = DMPair(metric_config=metric_config, drop_percent_A=0.2, drop_percent_B=0.2)
dmpair.compute_similarity()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a minor formatting comment but LGTM. Re James' last comment - maybe a sanity check/test that mmd
with drop=0.8
is greater than with drop=0.2
(for example), would be helpful just to convince that it is working as expected.
Co-authored-by: Jack Roberts <[email protected]>
This PR implements the following:
mmd
function which takes two NP arrays, an embedding name, and a kernel name as inputload_config
to handle loading configs given a file pathThis resolves #5 and contributes to #19.
I've also opened two new issues to further extend this initial implementation:
mmd
EDIT: I also added some CIFAR bits to the .gitignore as suggested by @jack89roberts at some point somewhere