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
Pairwise bootstrap ISC doesn't work #472
Comments
Hello! From my understanding, you diagnosed the problem correctly: More generally, I would be cautions about using |
Hi @yibeichan, thanks for pointing this out! Like @CameronTEllis said, you're correct that it breaks when receiving nans specifically when Thinking about how best to deal with this... Looking closer at the code, I think that the preceding |
@snastase I agree with your suggested fix, it seems like that assertion is unnecessary given the other checks. |
Thank you all! @CameronTEllis yes, I have too many voxels. I tried it on a small set. It worked. What do you mean Are all voxels for a given TR nans or are some voxels all nans or is it something between? Since my input is an ISC matrix with the shape as (num of pairs, num of voxels), I don't have any TR information anymore. So what's your concern? @snastase do we really need to add |
oh yeah, I'm just curious when we will get a vector, not a matrix from |
@yibeichan |
Hi,
I'm using
bootstrap_isc
withpairwise=True
. The first time I ran it, I got the error fromassert np.allclose(voxel_iscs, voxel_iscs.T)
because myisc_data
has nan. When we do a comparison,nan
is never equal tonan
. So I appliednp.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:
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.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!
The text was updated successfully, but these errors were encountered: