07bbcbb72cbfcea9ef10087167163138165c5003,plot_poldrack_space_net.py,,,#,6
Before Change
from load_poldrack import load_gain_poldrack
mem = Memory(cachedir="cache", verbose=3)
X, y, _, mask, affine = mem.cache(load_gain_poldrack)(smooth=0)
img_data = np.zeros(list(mask.shape) + [len(X)])
img_data[mask, :] = X.T
// prepare input data for learner
import nibabel
n_samples = img_data.shape[-1]
n_samples_train = n_samples * 8 / 10
mask_img = nibabel.Nifti1Image(mask.astype(np.int), affine)
X_train = nibabel.Nifti1Image(img_data[:, :, :, :n_samples_train], affine)
y_train = y[:n_samples_train]
X_test = nibabel.Nifti1Image(img_data[:, :, :, n_samples_train:], affine)
y_test = y[n_samples_train:]
////// Fit and predict ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
from nilearn.decoding import SpaceNetRegressor
After Change
// prepare input data for learner
n_samples = len(X)
n_samples_train = n_samples * 8 / 10
X_train = X[:n_samples_train]
y_train = y[:n_samples_train]
X_test = X[n_samples_train:]
y_test = y[n_samples_train:]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: nilearn/nilearn
Commit Name: 07bbcbb72cbfcea9ef10087167163138165c5003
Time: 2015-07-28
Author: elvis.dohmatob@inria.fr
File Name: plot_poldrack_space_net.py
Class Name:
Method Name:
Project Name: dask/dask-image
Commit Name: b470898504d2a077433a84e12a7c8078b2494760
Time: 2018-10-01
Author: jakirkham@gmail.com
File Name: dask_image/ndmeasure/__init__.py
Class Name:
Method Name: center_of_mass
Project Name: nilearn/nilearn
Commit Name: c943318502c17ea9d909e79ce898431282768cb9
Time: 2015-07-28
Author: elvis.dohmatob@inria.fr
File Name: plot_poldrack_space_net.py
Class Name:
Method Name: