.. _sphx_glr__auto_examples_shortclips: Shortclips tutorial =================== This tutorial describes how to perform voxelwise modeling on a visual imaging experiment. **Data set:** This tutorial is based on publicly available data `published on GIN `_ :ref:`[4b]`. This data set contains BOLD fMRI responses in human subjects viewing a set of natural short movie clips. The functional data were collected in five subjects, in three sessions over three separate days for each subject. Details of the experiment are described in the original publication :ref:`[4]`. If you publish work using this data set, please cite the original publications :ref:`[4]`, and the GIN data set :ref:`[4b]`. **Models:** This tutorial implements different voxelwise encoding models: - a ridge model with wordnet semantic features as described in :ref:`[4]`. - a ridge model with motion-energy features as described in :ref:`[3]`. - a banded-ridge model with both feature spaces as described in :ref:`[12]`. **Scikit-learn API:** These tutorials use `scikit-learn `_ to define the preprocessing steps, the modeling pipeline, and the cross-validation scheme. If you are not familiar with the scikit-learn API, we recommend the `getting started guide `_. We also use a lot of the scikit-learn terminology, which is explained in great details in the `glossary of common terms and API elements `_. **Running time:** Most of these tutorials can be run in a reasonable time (under 1 minute for most examples, ~7 minutes for the banded ridge example) with a GPU backend in `himalaya `_. Using a CPU backend is slower (typically 10 times slower). **Requirements:** This tutorial requires the following Python packages: - voxelwise_tutorials (this repository) and its dependencies - cupy or pytorch (optional, to use a GPU backend in himalaya) **Gallery of scripts:** Click on each thumbnail below to open the corresponding page: .. raw:: html
.. raw:: html
.. only:: html .. image:: /_auto_examples/shortclips/images/thumb/sphx_glr_00_download_shortclips_thumb.png :alt: :ref:`sphx_glr__auto_examples_shortclips_00_download_shortclips.py` .. raw:: html
Download the data set
.. raw:: html
.. only:: html .. image:: /_auto_examples/shortclips/images/thumb/sphx_glr_00_setup_colab_thumb.png :alt: :ref:`sphx_glr__auto_examples_shortclips_00_setup_colab.py` .. raw:: html
Setup Google Colab
.. raw:: html
.. only:: html .. image:: /_auto_examples/shortclips/images/thumb/sphx_glr_01_plot_explainable_variance_thumb.png :alt: :ref:`sphx_glr__auto_examples_shortclips_01_plot_explainable_variance.py` .. raw:: html
Compute the explainable variance
.. raw:: html
.. only:: html .. image:: /_auto_examples/shortclips/images/thumb/sphx_glr_02_plot_ridge_regression_thumb.png :alt: :ref:`sphx_glr__auto_examples_shortclips_02_plot_ridge_regression.py` .. raw:: html
Understand ridge regression and cross-validation
.. raw:: html
.. only:: html .. image:: /_auto_examples/shortclips/images/thumb/sphx_glr_03_plot_wordnet_model_thumb.png :alt: :ref:`sphx_glr__auto_examples_shortclips_03_plot_wordnet_model.py` .. raw:: html
Fit a ridge model with wordnet features
.. raw:: html
.. only:: html .. image:: /_auto_examples/shortclips/images/thumb/sphx_glr_04_plot_hemodynamic_response_thumb.png :alt: :ref:`sphx_glr__auto_examples_shortclips_04_plot_hemodynamic_response.py` .. raw:: html
Visualize the hemodynamic response
.. raw:: html
.. only:: html .. image:: /_auto_examples/shortclips/images/thumb/sphx_glr_05_plot_motion_energy_model_thumb.png :alt: :ref:`sphx_glr__auto_examples_shortclips_05_plot_motion_energy_model.py` .. raw:: html
Fit a ridge model with motion energy features
.. raw:: html
.. only:: html .. image:: /_auto_examples/shortclips/images/thumb/sphx_glr_06_plot_banded_ridge_model_thumb.png :alt: :ref:`sphx_glr__auto_examples_shortclips_06_plot_banded_ridge_model.py` .. raw:: html
Fit a banded ridge model with both wordnet and motion energy features
.. raw:: html
.. only:: html .. image:: /_auto_examples/shortclips/images/thumb/sphx_glr_07_extract_motion_energy_thumb.png :alt: :ref:`sphx_glr__auto_examples_shortclips_07_extract_motion_energy.py` .. raw:: html
Extract motion energy features from the stimuli
.. raw:: html
.. toctree:: :hidden: /_auto_examples/shortclips/00_download_shortclips /_auto_examples/shortclips/00_setup_colab /_auto_examples/shortclips/01_plot_explainable_variance /_auto_examples/shortclips/02_plot_ridge_regression /_auto_examples/shortclips/03_plot_wordnet_model /_auto_examples/shortclips/04_plot_hemodynamic_response /_auto_examples/shortclips/05_plot_motion_energy_model /_auto_examples/shortclips/06_plot_banded_ridge_model /_auto_examples/shortclips/07_extract_motion_energy