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
- Yarray of shape (n_time_points, n_voxels)
The fMRI data.
- Xarray of shape (n_time_points, n_regressors)
The design matrix.
- noise_model{‘ar1’, ‘ols’}, optional
The temporal variance model. Default=’ar1’.
- binsint, optional
Maximum number of discrete bins for the AR(1) coef histogram. Default=100.
- n_jobsint, optional
The number of CPUs to use to do the computation. -1 means ‘all CPUs’. Default=1.
- verboseint, optional
The verbosity level. Defaut=0.
- Returns
- labelsarray of shape (n_voxels,),
A map of values on voxels used to identify the corresponding model.
- resultsdict,
Keys correspond to the different labels values values are RegressionResults instances corresponding to the voxels.