Skip to content

Commit d11a99f

Browse files
committed
DOC add more details in the examples
1 parent f041e5a commit d11a99f

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

tutorials/movies_3T/01_plot_explainable_variance.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
This shared component can be estimated by taking the mean over repeats of the
1515
same experiment. The variance of this shared component, that we call the
1616
explainable variance, is the upper bound of the voxelwise modeling
17-
performances.
17+
performances. The explainable variance is also sometimes called the *noise
18+
ceiling*.
1819
"""
1920
# sphinx_gallery_thumbnail_number = 2
2021
###############################################################################

tutorials/movies_3T/02_plot_wordnet_model.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,15 @@
120120
# mean value in fMRI recording is non-informative, so each run is detrended and
121121
# demeaned independently, and we do not need to predict an intercept value in
122122
# the linear model.
123+
#
124+
# However, we prefer not to normalize by the standard deviation of each
125+
# feature. Indeed, if the features are extracted in a consistent way from the
126+
# stimulus, there relative scale is meaningful. Normalizing them independently
127+
# from each other would remove this meaning. Moreover, the wordnet features are
128+
# one-hot-encoded, which means that each feature is either present (1) or not
129+
# present (0) in each sample. Normalizing one-hot-encoded features is not
130+
# recommended, since it would scale disproportionately the infrequent features.
131+
123132
from sklearn.preprocessing import StandardScaler
124133
scaler = StandardScaler(with_mean=True, with_std=False)
125134

@@ -398,6 +407,8 @@
398407
plt.show()
399408

400409
###############################################################################
410+
# In this dataset, the brain responses are recorded every two seconds.
411+
#
401412
# We see that the hemodynamic response function (HRF) is captured in the model
402413
# weights. In practice, we can limit the number of features by using only
403414
# the most informative delays, for example [1, 2, 3, 4].

0 commit comments

Comments
 (0)