-
Notifications
You must be signed in to change notification settings - Fork 89
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
Update cca.py #425
base: main
Are you sure you want to change the base?
Update cca.py #425
Conversation
Bug fix: given two samples x and y of shape (m, n), statistic(x, y) gave a different output from scikitlearn CCA function
✅ Deploy Preview for hyppo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Excuse me, the hyppo test fails even with the code that was already there. How can I be sure my modifies are correct or not? |
Can you write a unit test for your change? |
Done. I don't know if it's what you're looking for |
Almost perfect. Instead of changing it as you have with unittest, I think it's sufficient to leave the file as is and only modify the oned test with the one you wrote |
If that is successful, I'll merge |
Good morning. After revising the statistic function, I ran the tests with the original implementation. I observed that 0.07 was not the expected output for a `np.random.seed(123456789) x, y = joint_normal(1000, 3) Both the hyppo and sklearn methods return the same output, which for I modified the expected statistic values in the tests, and they now pass successfully. Regarding the errors in the hyppo bot tests, most of them seem to be precision errors. However, as I mentioned earlier, the original CCA code also produced similar errors in these tests, so I am unsure how to proceed. Please let me know how you would like to address this. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #425 +/- ##
=======================================
Coverage 96.80% 96.80%
=======================================
Files 96 96
Lines 4476 4476
=======================================
Hits 4333 4333
Misses 143 143 ☔ View full report in Codecov by Sentry. |
Apologies for the disturbance once again. After numerous trials, I was able to identify and resolve the issue with the program. The problem was related to the squaring of values in the initial case. However, during testing, one particular test case failed to produce the correct result. Upon thorough review, I confirmed that the test itself was incorrect and subsequently modified it. Following this correction, all checks now pass successfully. I believe the changes are ready to be merged. |
Rewrote statistic function in cca.py.
Now it outputs similar values to scikitlearn.
For similar i mean values equal up to the third or fourth decimal.