13482b28622840a153162b4c070bffdf05d51d38,plot_haxby_searchlight.py,,,#,17

Before Change



////// Preprocess data //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Change axis in order to have X under n_samples * x * y * z
X = np.rollaxis(fmri_data, 3)
// X.shape is (1452, 40, 64, 64)

// Mean image: used as background in visualisation
mean_img = np.mean(X, axis=0)

After Change



////// Restrict to faces and houses ////////////////////////////////////////////////////////////////////////////////////////////
condition_mask = np.logical_or(conditions == "face", conditions == "house")
X = fmri_data[..., condition_mask]
y = y[condition_mask]
session = session[condition_mask]
conditions = conditions[condition_mask]

////// Loading step ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
from nisl import mri_transformer
from nisl.utils import Niimg
// Detrending is disabled as we are not yet able to do it by session
mri_loader = mri_transformer.MRITransformer(mask=mask, detrend=True,
        copy=False, sessions=session)
niimg = Niimg(X, affine)
X_masked = mri_loader.fit(niimg).transform(niimg)
X_detrended = mri_loader.inverse_transform(X_masked).get_data()

////// Prepare the masks //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Here we will use several masks :
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: nilearn/nilearn
Commit Name: 13482b28622840a153162b4c070bffdf05d51d38
Time: 2012-08-21
Author: alexandre.abraham@cea.fr
File Name: plot_haxby_searchlight.py
Class Name:
Method Name:


Project Name: nipy/dipy
Commit Name: ba9c11ddc2dc24d34f80bc6225fd6da81d68f1c2
Time: 2010-04-17
Author: matthew.brett@gmail.com
File Name: dipy/io/dicomwrappers.py
Class Name: MosaicWrapper
Method Name: get_data


Project Name: hyperspy/hyperspy
Commit Name: 5021639cc20b0756b2e817c31f6ac4095fca8db4
Time: 2015-07-21
Author: vidartf@gmail.com
File Name: hyperspy/_components/polynomial.py
Class Name: Polynomial
Method Name: estimate_parameters