Pairwise bootstrap ISC doesn't work
See original GitHub issueHi,
I’m using bootstrap_isc
with pairwise=True
. The first time I ran it, I got the error from assert np.allclose(voxel_iscs, voxel_iscs.T)
because my isc_data
has nan. When we do a comparison, nan
is never equal to nan
. So I applied np.nan_to_num(isc_data)
and I ran a whole night for a (378, 161032) ISC data, neither any results nor errors. It’s weird.
My questions are:
- is
assert np.allclose(voxel_iscs, voxel_iscs.T)
that necessary to be here? Sincenan != nan
, whenever we compare two matrices with nans, even if they are identical, we’ll always get False. - what happened to my second try with
np.nan_to_num(isc_data)
? There is no error so I don’t what was going on. I guess, it just needs more time to do the computation.
Thank you!
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
brainiak/test_isc.py at master - GitHub
Check pairwise and leave-one-out, and summary statistics for ISC. def test_isc_options(): ... Don't tolerate NaNs, should lose zeroeth voxel.
Read more >Bootstrap Resampling - Amazon AWS
Apply bootstrap resampling to the auto price data as follows: ... You will need to do this pair wise; e.g. between each possible...
Read more >brainiak package — brainiak 0.11 documentation
Uses subject-wise (not pair-wise) resampling in the pairwise approach. Returns the observed ISC, the confidence interval, and a p-value for the bootstrap ......
Read more >Pairwise ISC of brain activity. Spatial representation of the...
html#nilearn.datasets.fetch_surf_fsaverage). Only voxels surviving a bootstrap non-parametric test at q < 0.01 FDR corrected are shown. All data shown are ...
Read more >Bootstrap Methods - SAS Help Center
Because the bootstrap works the same way with a wide variety of statistics ... The TTEST procedure does not support the use of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Yibeichan
squareform
is kind of like a toggle: if you input a distance vector, it outputs the distance matrix; if you input a distance matrix, it outputs the distance vector. Thoseassert
statements probably snuck in there when I was initially writing the code (and hadn’t thought aboutforce='tomatrix'
). I don’t think theforce='tomatrix'
is strictly necessary given the tests in_check_isc_input
, but I don’t mind a little redundancy if it makes thesquareform
easier to interpret.oh yeah,
assert voxel_iscs.shape[0] == voxel_iscs.shape[1]
only checks the shape, butforce='tomatrix'
actually returns you a matrix. But I thought a matrix is default if the input is in the correct shape?I’m just curious when we will get a vector, not a matrix from
squareform()
if we don’t specifyforce='tovector'
. I mean, do we have to addforce='tomatrix'
in_check_isc_input
?