-
Notifications
You must be signed in to change notification settings - Fork 41
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
GRCCA gives quite different results with original implementation #163
Comments
Looks like a scaling thing a bit like #162 - the correlations of the weights are >0.90 or higher. I'm pushing an update that will ensure that for cca_zoo models wXXw=n where n is the number of samples. |
Would be good to get a bit closer though I'll take another look at the implementation. |
ok think I've found the source of the error. Will let you know the results soon. |
OK the source of this is basically a misalignment between RCCA lambda and cca_zoo c. lambda gets added to the covariance matrices but c slides between 0 regularisation and 1 maximal regularisation (all ones on the diagonal). |
Would it make sense to include a testing folder somewhere in cca_zoo that checks original R-implementations against cca_zoos doppelgängers? I noticed that it's actually quite handy to just be able to import R-packages with |
Yeah definitely! Will almost certainly add this one in somewhere. Obviously there's some sharp edges (e.g. here where the parameterizations don't quite match) but no harm in having them |
I've used variants of your script to check that the source of the difference is lambda/c and convinced myself. PRCCA with no regularisation (and fewer features than samples) everything matches GRCCA with very high regularisation also matches GRCCA with no regularisation doesn't match but it is because of line 91 in https://github.com/ElenaTuzhilina/RCCA/blob/master/R/GRCCA.R where PRCCA is called with lambda=1 regardless of what the user inputs. This means it's not really possible to match cca_zoo and RCCA up in this instance. It seems a bit odd that they do this I think it's possible its a bug in RCCA. |
Let me know if I can help with a PR!
Ah okay. Do you still have to update |
Hi James, similar to #107, I implemented a test to check if
cca_zoo.models.GRCCA
gives similar results as the original implementation. But the feature weights are quite dissimilar especially for the much smallery
input array:Here's the testing code:
The text was updated successfully, but these errors were encountered: