// BF for issue /맒
// make data (SVD)
rng = np.random.RandomState(0)
shape = (20, 10, 1)
affine = np.eye(4)
components = _make_canica_components(shape)
// make more de-activations than activations
for mp in components:
mp[rng.randn(*mp.shape) > .8] *= -1.
assert_less_than(mp.max(), -mp.min()) // goal met ?
data = _make_data_from_components(components, affine, shape,
rng=rng, n_subjects=2)
// synthesize data with given components
data = _make_data_from_components(components, affine, shape, rng=rng,
n_subjects=2)
mask_img = nibabel.Nifti1Image(np.ones(shape, dtype=np.int8), affine)
// fit run CanICA at different times of the day
canica = CanICA(n_components=4, random_state=rng, mask=mask_img)