-
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
Inline calculations #58
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #58 +/- ##
==========================================
- Coverage 98.69% 98.68% -0.01%
==========================================
Files 23 23
Lines 459 456 -3
==========================================
- Hits 453 450 -3
Misses 6 6 ☔ View full report in Codecov by Sentry. |
32c00fe
to
c721436
Compare
@p-gw Gentle ping :) |
I'll most likely get to review it this week. |
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.
The overall changes look good to me, nice speed up in rotate
as well. Before we can merge this we need to rebase on the current main branch.
use the loadings from the recent GPArotations
since it gives better diagnostic message
as the generic method defined for real L matrix
* in-place gradient calculation * remove criterion() methods * optimize some calculations
Thank you for the review! I've rebased the PR, the CI tests pass except for nightly, which is due to Ezyme problems not related to the PR. |
Switches to in-line
criterion_and_gradient!()
, as well as in-linegradient_f!()
and in-lineproject_X!()
.I have tried to reduce temporary array allocations by using methods like 5-arg
mul!()
oraxpy!()
and made some tweaks in specific rotation methods.But more in-depth code analysis + profiling would be required to tune the performance (in future PRs).
Note that I have changed the reference Quartimax loadings (
pub
matrix) in the test: after thecrieterion_and_gradient!()
changes it started to fail, and increasingatol
did not help.So I have checked what is the output of the GPArotation package (from the same authors as the original 2005 publication), and it was also different from
pub
.The Quartimax criterion based on the original
pub
loadings is smaller (by ~1e-6), but I suspect that is the result of the rounding error, and the corresponding rotation matrix would have been non-orthogonal.The criterion difference between GPArotation and Quartimax was ~1e-16.
Fixes #57