-
Notifications
You must be signed in to change notification settings - Fork 533
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
RF: Optimize ICC_rep_anova using a global cache #3407
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3407 +/- ##
==========================================
- Coverage 65.21% 65.21% -0.01%
==========================================
Files 307 307
Lines 40474 40485 +11
Branches 5351 5354 +3
==========================================
+ Hits 26395 26402 +7
- Misses 13004 13006 +2
- Partials 1075 1077 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
@bbfrederick Thanks for your patience. I think when I first looked at this, I wanted to try to figure out an alternative to using global
, but I don't think that should hold this up. Giving up on that dream and revisiting this, the only suggestion I have is that we can use the @
operator to have more readable matrix multiplication. Happy to merge this in as-is, though.
x = kron(eye(nb_conditions), ones((nb_subjects, 1))) # sessions | ||
x0 = tile(eye(nb_subjects), (nb_conditions, 1)) # subjects | ||
X = hstack([x, x0]) | ||
centerbit = dot(dot(X, pinv(dot(X.T, X))), X.T) |
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.
centerbit = dot(dot(X, pinv(dot(X.T, X))), X.T) | |
centerbit = X @ pinv(X.T @ X) @ X.T |
|
||
# Sum Square Error | ||
predicted_Y = dot(dot(dot(X, pinv(dot(X.T, X))), X.T), Y.flatten("F")) | ||
predicted_Y = dot(centerbit, Y.flatten("F")) |
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.
predicted_Y = dot(centerbit, Y.flatten("F")) | |
predicted_Y = centerbit @ Y.flatten("F") |
Actually, yes, let's revert the |
@bbfrederick Looking to do another release next week, if you want to try to get this one finished off? |
Consider #3454 as an alternative. |
Summary
Fixes #3406 .
List of changes proposed in this PR (pull-request)
Acknowledgment