Skip to content
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

isc: output dimensions for ISFC analysis #399

snastase opened this issue Jan 9, 2019 · 1 comment


Copy link

commented Jan 9, 2019

I want to solicit opinions about the ideal output dimensions for brainiak.isc.isfc; just had a conversation with @manojneuro offline about this. Currently, if we input an array with shape (n_TRs, n_voxels, n_subjects), the vanilla isc function returns an (n_subjects, n_voxels) (or (n_pairs, n_voxels)) array of ISC values—this makes sense to me based on our discussions about standardizing dimension order in BrainIAK, because these ISC values are now our samples of interest per voxel. The downstream statistical tests for ISCs are expecting this n_subjects by n_voxels structure—typically your test will return a single statistic that collapse over the first dimension, leaving you with a single value (e.g., a p-value) per voxel. In contrast, if we supply the same array to isfc, we get an output array of ISFCs with shape (n_voxels, n_voxels, n_subjects). This sort of makes sense in a vacuum, but doesn't really match the logic of the isc function, and also won't play nicely with statistical tests without some manual re-structuring. I think my favorite option here would be to use squareform to vectorize the n_voxels by n_voxels matrices per subject into something like n_connections and put this vector in the second dimension, so the output would be shaped (n_subjects, n_connections). With 20 subjects and 1000 voxels, this will yield an isfc output shaped (20, 499500) (where 1000 * (1000 - 1) / 2 = 499500). This would play nicely with the compute_summary_statistic, bootstrap_isc, and permutation_isc tests without any external reshaping by the user, yielding an output vector with 499500 values (e.g., mean ISFCs, p-values, etc), which can then be supplied to squareform to recover the (1000, 1000) shape. This might be a little less intuitive at first, but seems more internally consistent and efficient. Any thoughts on this? @qihongl @mihaic

@snastase snastase self-assigned this Jan 9, 2019


This comment has been minimized.

Copy link

commented Jan 9, 2019

Sounds reasonable. In terms of API stability, considering we have not released a new BrainIAK version since PR #384, I see no issue making the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.