-
Notifications
You must be signed in to change notification settings - Fork 82
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
Add improved goodness of fit implementation #190
Conversation
5e21cdc
to
c826b68
Compare
c826b68
to
f43971f
Compare
@stes about what I implemented in #202 that I do see here. I think it would be good to have a really basic function where you provide the loss and the batch size, so that it is easily usable in the pytorch implementation as well. Also, it would be nice to test for the default |
The build issue is fixed, and once #205 is merged tests should pass here as well. |
1d55ead
to
ad8ae60
Compare
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.
Thank you @stes! This looks nice!! Some minor suggestions on the docstrings and maybe add some tests for the different corner cases based on the arguments provided in infonce_to_goodness_of_fit
.
a1b4cf3
to
f5ec82c
Compare
one review comment to resolve (= add more relevant tests for one batchsize None), then ready! |
7c85975
to
c94f5ae
Compare
Co-authored-by: Célia Benquet <[email protected]>
Co-authored-by: Célia Benquet <[email protected]>
Co-authored-by: Célia Benquet <[email protected]>
Co-authored-by: Célia Benquet <[email protected]>
0598346
to
3771990
Compare
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.
lgtm! thanks
This adds a better goodness of fit measure. Instead of the old variant which simply matched the InfoNCE and depends on the batch size, the proposed measure
The conversion is quite simply done via
This measure is also used in DeWolf et al., 2024, Eq. (43)
Application example (GoF improves from 0 to a larger value during training):
OLD example, for comparison
Close https://github.com/AdaptiveMotorControlLab/CEBRA-dev/pull/669