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

Before Change



// Detrend data on each session independently
from scipy import signal
for s in np.unique(session):
    X[session == s] = signal.detrend(X[session == s], axis=0)

////// Prepare the masks //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Here we will use several masks :
// * mask is the originalmask
// * process_mask is a subset of mask, it contains voxels that should be
//   processed (we only keep the slice z = 26 and the back of the brain to speed
//   up computation)
process_mask = mask.copy()
process_mask[..., 38:] = False
process_mask[..., :36] = False
process_mask[:, 30:] = False

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 :
// * mask is the originalmask
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

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: LxMLS/lxmls-toolkit
Commit Name: 04b4eb0d841f8dfe1d095b2af4bcf57cda72c1d2
Time: 2012-07-11
Author: ramon@astudillo.com
File Name: lxmls/classifiers/multinomial_naive_bayes.py
Class Name: MultinomialNaiveBayes
Method Name: train


Project Name: mne-tools/mne-python
Commit Name: 717eedd5f9ce22431e40a15c378863de6730d3e8
Time: 2019-03-15
Author: larson.eric.d@gmail.com
File Name: mne/viz/raw.py
Class Name:
Method Name: _update_raw_data