-
Notifications
You must be signed in to change notification settings - Fork 73
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
How can I obtain the lambda values corresponding to the aligned gradient map #94
Comments
Hi, I have the same confusion. Look forward to your reply. |
I have the same confusion~ |
Hi, folks Apologies for the late reply The lambdas we obtain with GradientsMaps correspond to the original gradients (the order of the lambdas does not change). After alignment, there is no correspondence between the lambdas and the aligned gradients. And, I don't know if there is a way to obtain some proxy lambdas for the aligned gradients For more context: With this, the correspondence between the aligned gradients and the lambdas is lost. There are some simple scenarios such as the one below (e.g., the rotation simply changes the positions of gradients 1 and 2) where it is easy to know the correspondence, but this is very unlikely with gradients. Let's leave this open to see if we can get feedback from other users... |
wow, thank for your kindly help~ I noticed that there are some one used the transform matrix to adjust the sequence of lambdas. So, in fact, these method is not proper for the correpondence? |
If I get it right, the code is using the absolute values of the procrustes rotation to find the correspondence between the original gradients and the aligned ones based on the largest values. Above, we had that We are just considering correspondence based on the largest values, but I think it's a good approximation |
Thank you so much~ |
@OualidBenkarim thank you for the above explanation of the lambdas! I came here to ask a different question and now i realize i have more to think about. I'm simply (i thought) trying to extract the percent variance explained for the principal gradient. This is the code I'm using to extract the default first 10 gradients:
In the output, gm.gradients and gm.aligned have 10 gradients as expected, but gm.lambda has 17 values when I would expect there to be 10 as well. This, as well as the above discussion about losing lambda correspondence with alignment, has me questioning whether it's appropriate to simply use the first lambda to get the explained variance i'm after. I do observe that the lambdas are always decreasing and that the first aligned gradient is always clearly the principal FC gradient, but still questioning it based on these other factors. Thanks! |
Following up to say that searching through the docs more and experimenting a bit answered most of my question:
i'm happy to have a slightly better understanding now, but still wondering how 17 is the max and also reiterating @gourdchen 's question about variance explained for the aligned gradients... the solution described above seems like quite a rough approximation as you mention, and i'd expect that there would have to be some way to use the rotation matrix with the full set of gradients and lambdas, but i'm not super confident that i can figure out that math. |
Hi @annchenknodt , About your last question, I think the approach described above is a good approximation. Can't think of any other method that would do a better job As for the n_components, it depends on the size of your matrix. For a |
@OualidBenkarim thank you! i've come to the conclusion that papers that report variance explained must just be reporting it for the pre-rotation gradients... re n_components, my matrix is 360x360 (i'm using the HCP-MPP Glasser parcellation), so that's why i'm a bit miffed that I'm getting 17 components. I had tried setting it to 200 (i think i accidentally said 17 in my prev post), and got an error that I requested too many, which still doesn't make sense. |
Hi @annchenknodt , I'm going to assume you're using the MATLAB implementation since you posted a Truth be told I'm not entirely sure anymore why this is in here (despite writing it myself :-) ), and I don't see why this couldn't just return the full set (@OualidBenkarim?). |
Ah! Yes i'm using the matlab version. Sqrt(360) = 18.97 - close enough to make much more sense, thank you!! i'm glad i'm not the only one who doesn't always remember why something is in my code :-) |
In other words, after alignment, the order of the original gradients may change, and the order of the corresponding lambda values may also change. How can I obtain this information?
The text was updated successfully, but these errors were encountered: