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.

fetch_haxby

nilearn.datasets.fetch_haxby(data_dir=None, n_subjects=(2,), fetch_stimuli=False, url=None, resume=True, verbose=1)[source]

Download and loads complete the Haxby dataset.

See Haxby et al.[1].

Changed in Nilearn 0.15.0: The subjects parameter was renamed to n_subjects.

Parameters:
data_dirpathlib.Path or str or None, optional

Path where data should be downloaded. By default, files are downloaded in a nilearn_data folder in the home directory of the user. See also nilearn.datasets.utils.get_data_dirs.

n_subjectsint, list or tuple of int, or None

Number of subjects to load, or their one-based indices. If None is given, all available subjects are loaded. An empty list or tuple is not allowed. By default, 2nd subject will be loaded.

fetch_stimulibool, default=False

Indicate if stimuli images must be downloaded. They will be presented as a dictionary of categories.

urlstr or None, default=None

URL of file to download. Override download URL. Used for test only (or if you setup a mirror of the data).

resumebool, default=True

Whether to resume download of a partly-downloaded file.

verbosebool or int, default=1

Verbosity level (0 or False means no message).

Returns:
datasklearn.utils.Bunch

Dictionary-like object, contains:

  • ‘anat’: list of str.

    Paths to anatomic images.

  • ‘func’: list of str.

    Paths to nifti file with BOLD data.

  • ‘session_target’: list of str.

    Paths to text file containing run and target data.

  • ‘mask’: str. Path to fullbrain mask file.

  • ‘mask_vt’: list of str.

    Paths to nifti ventral temporal mask file.

  • ‘mask_face’: list of str.

    Paths to nifti with face-responsive brain regions.

  • ‘mask_face_little’: list of str.

    Paths to nifti with face-responsive brain regions. Spatially more constrained version of mask_face.

  • ‘mask_house’: list of str.

    Paths to nifti with house-responsive brain regions.

  • ‘mask_house_little’: list of str.

    Paths to nifti with house-responsive brain regions. Spatially more constrained version of mask_house.

  • ‘t_r’: float

    Repetition time of the functional data.

Notes

If the dataset files are already present in the user’s Nilearn data directory, this fetcher will not re-download them. To force a fresh download, you can remove the existing dataset folder from your local Nilearn data directory.

For more details on how Nilearn stores datasets.

PyMVPA provides a tutorial making use of this dataset: http://www.pymvpa.org/tutorial.html

More information about its structure: http://dev.pymvpa.org/datadb/haxby2001.html

See additional information <https://www.science.org/doi/10.1126/science.1063736>

Run 8 in subject 5 does not contain any task labels. The anatomical image for subject 6 is unavailable.

References

Examples using nilearn.datasets.fetch_haxby

An introduction tutorial to fMRI decoding

An introduction tutorial to fMRI decoding

Basic nilearn example: manipulating and looking at data

Basic nilearn example: manipulating and looking at data

More plotting tools from nilearn

More plotting tools from nilearn

NeuroImaging volumes visualization

NeuroImaging volumes visualization

Plot Haxby masks

Plot Haxby masks

Plotting tools in nilearn

Plotting tools in nilearn

Comparing classifiers in decoding

Comparing classifiers in decoding

Cortical surface-based searchlight decoding

Cortical surface-based searchlight decoding

Decoding of a dataset after GLM fit for signal extraction

Decoding of a dataset after GLM fit for signal extraction

Decoding with ANOVA + SVM

Decoding with ANOVA + SVM

Decoding with fast ensembling of regularized models

Decoding with fast ensembling of regularized models

Effect of standardization on decoding performance

Effect of standardization on decoding performance

Multi-class strategies

Multi-class strategies

ROI-based decoding analysis

ROI-based decoding analysis

Searchlight analysis

Searchlight analysis

Show stimuli of Haxby dataset

Show stimuli of Haxby dataset

Tuning a parameter with cross-validation

Tuning a parameter with cross-validation

Understanding Decoder

Understanding Decoder

Computing a Region of Interest (ROI) mask manually

Computing a Region of Interest (ROI) mask manually

Advanced decoding using scikit-learn

Advanced decoding using scikit-learn

Massively univariate analysis of a visual task

Massively univariate analysis of a visual task

SearchLight with a custom correlation estimator

SearchLight with a custom correlation estimator