-
-
Notifications
You must be signed in to change notification settings - Fork 619
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 HSIC metric #3282
add HSIC metric #3282
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.
Thanks a lot for the PR @kzkadc !
I have few questions and comments to address.
Please also check failing CI jobs with code formatting issues.
@vfdev-5 |
@kzkadc please check mypy failure:
|
@kzkadc some distributed tests are failing: =========================== short test summary info ============================
FAILED tests/ignite/metrics/test_hsic.py::TestDistributed::test_integration[gloo_cpu--1.0-1.0] - assert 3.780633494340978e-05 ± 2.0e-05 == 2.1274586519148087e-31
comparison failed
Obtained: 2.1274586519148087e-31
Expected: 3.780633494340978e-05 ± 2.0e-05
FAILED tests/ignite/metrics/test_hsic.py::TestDistributed::test_integration[gloo_cpu-1.0--1.0] - assert 3.780633494340978e-05 ± 2.0e-05 == 5.500369049116216e-11
comparison failed
Obtained: 5.500369049116216e-11
Expected: 3.780633494340978e-05 ± 2.0e-05
FAILED tests/ignite/metrics/test_hsic.py::TestDistributed::test_integration[gloo_cpu-1.0-1.0] - assert 3.780633494340978e-05 ± 2.0e-05 == 3.3436754842126586e-39
comparison failed
Obtained: 3.3436754842126586e-39
Expected: 3.780633494340978e-05 ± 2.0e-05
========== 3 failed, 2 skipped, 3133 deselected, 2 warnings in 7.72s =========== I haven't checked in details why, but from the first glance something looks weird in the output values which are almost zeros and expected is just close to zero. Any ideas why this happens? |
This reverts commit cb71355.
I'm struggling with the numerical errors and have been checking the code, but I'm not sure why it happens for now. |
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.
Thanks for the PR @kzkadc !
Approving it, currently the failing job is unrelated, PR is good to go once other CI jobs are green.
@vfdev-5 Thank you for fixing the test! |
Description: added Hilbert-Schmidt Independence Criterion (HSIC).
HSIC is a kernel-based method to measure the statistical independence between two feature vectors:
https://papers.nips.cc/paper_files/paper/2007/hash/d5cfead94f5350c12c322b5b664544c1-Abstract.html
https://jejjohnson.github.io/research_journal/appendix/similarity/hsic/
This metric computes the unbiased estimator of the HSIC proposed in the following:
https://jmlr.csail.mit.edu/papers/v13/song12a.html
Check list: