def test_ISC():
# Create dataset in which one voxel is highly correlated across subjects
# and the other is not
D = np.zeros((2, 5, 3))
D[:, :, 0] = \
[[-0.36225433, -0.43482456, 0.26723158, 0.16461712, -0.37991465],
[-0.62305959, -0.46660116, -0.50037994, 1.81083754, 0.23499509]]
D[:, :, 1] = \
[[-0.30484153, -0.49486988, 0.10966625, -0.19568572, -0.20535156],
[1.68267639, -0.78433298, -0.35875085, -0.6121344, 0.28603493]]
D[:, :, 2] = \
[[-0.36593192, -0.50914734, 0.21397317, 0.30276589, -0.42637472],
[0.04127293, -0.67598379, -0.51549055, -0.64196342, 1.60686666]]
(ISC, p) = brainiak.isfc.isc(D, return_p=True, num_perm=100,
two_sided=True, random_state=0)
assert np.isclose(ISC, [0.8909243, 0.0267954]).all(), \
"Calculated ISC does not match ground truth"
assert np.isclose(p, [0.02, 1]).all(), \
"Calculated p values do not match ground truth"
评论列表
文章目录