Note
This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.
8.12.15.10. nilearn.glm.first_level.run_glm¶
nilearn.glm.first_level.
run_glm
(Y, X, noise_model='ar1', bins=100, n_jobs=1, verbose=0)¶GLM fit for an fMRI data matrix
Parameters: Y : array of shape (n_time_points, n_voxels)
The fMRI data.
X : array of shape (n_time_points, n_regressors)
The design matrix.
noise_model : {‘ar1’, ‘ols’}, optional
The temporal variance model. Defaults to ‘ar1’.
bins : int, optional
Maximum number of discrete bins for the AR(1) coef histogram.
n_jobs : int, optional
The number of CPUs to use to do the computation. -1 means ‘all CPUs’.
verbose : int, optional
The verbosity level. Defaut is 0
Returns: labels : array of shape (n_voxels,),
A map of values on voxels used to identify the corresponding model.
results : dict,
Keys correspond to the different labels values values are RegressionResults instances corresponding to the voxels.