1872ec1a1359fc4486f244b7e6e561cbbba10882,nilearn/decomposition/tests/test_canica.py,,test_component_sign,#,84

Before Change


    // BF for issue /맒

    // make data
    data, mask_img, components, rng = _make_canica_test_data(n_subjects=2)

    // fill with -1"s
    components[:] = -1

After Change


    // 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)
    for _ in range(3):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: nilearn/nilearn
Commit Name: 1872ec1a1359fc4486f244b7e6e561cbbba10882
Time: 2015-05-08
Author: elvis.dohmatob@inria.fr
File Name: nilearn/decomposition/tests/test_canica.py
Class Name:
Method Name: test_component_sign


Project Name: nilearn/nilearn
Commit Name: 1872ec1a1359fc4486f244b7e6e561cbbba10882
Time: 2015-05-08
Author: elvis.dohmatob@inria.fr
File Name: nilearn/decomposition/tests/test_canica.py
Class Name:
Method Name: test_component_sign


Project Name: nilearn/nilearn
Commit Name: 326700619a722f2da049e1d1a08a02c78d85bf1d
Time: 2013-06-11
Author: abraham.alexandre@gmail.com
File Name: nisl/decomposition/tests/test_canica.py
Class Name:
Method Name: test_canica_square_img


Project Name: nilearn/nilearn
Commit Name: a779bcd92e4978429799b3cacde20f5781e1ad3d
Time: 2013-05-31
Author: philippe.gervais@inria.fr
File Name: nisl/tests/test_searchlight.py
Class Name:
Method Name: