Skip to content

Commit

Permalink
Add Dan0s suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
eurunuela committed Mar 16, 2022
1 parent 262fa17 commit b28a282
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion docs/approach.rst
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,10 @@ to select the PCA components based on three widely-used model selection criteria
.. note::
Please, bear in mind that this is a data-driven dimensionality reduction approach. The default
option ``aic`` might not yield perfect results on your data. Consider ``kic``
and ``mdl`` options if running ``tedana`` with ``aic`` returns more components than expected. There is no definitively right number of components, but, for typical fMRI datasets, if the PCA explains more than 98% of the variance or if the number of components is more than half the number of time points, then it may be worth considering more aggressive threshold.
and ``mdl`` options if running ``tedana`` with ``aic`` returns more components than expected.
There is no definitively right number of components, but, for typical fMRI datasets, if the PCA
explains more than 98% of the variance or if the number of components is more than half the number
of time points, then it may be worth considering more aggressive thresholds.

The simplest approach uses a user-supplied threshold applied to the cumulative variance explained
by the PCA.
Expand Down
4 changes: 3 additions & 1 deletion tedana/decomposition/pca.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,9 @@ def tedpca(

n_samp, n_echos, n_vols = data_cat.shape

LGR.info("Computing PCA of optimally combined multi-echo data")
LGR.info(
f"Computing PCA of optimally combined multi-echo data with selection criteria: {algorithm}"
)
data = data_oc[mask, :]

data_z = ((data.T - data.T.mean(axis=0)) / data.T.std(axis=0)).T # var normalize ts
Expand Down

0 comments on commit b28a282

Please sign in to comment.