tedana.decomposition
.tedpca¶
-
tedpca
(catd, OCcatd, combmode, mask, t2s, t2sG, stabilize, ref_img, tes, kdaw, rdaw, ste=0, mlepca=True, wvpca=False)[source]¶ Use principal components analysis (PCA) to identify and remove thermal noise from multi-echo data.
Parameters: - catd ((S x E x T) array_like) – Input functional data
- OCcatd ((S x T) array_like) – Optimally-combined time series data
- combmode ({'t2s', 'ste'} str) – How optimal combination of echos should be made, where ‘t2s’ indicates using the method of Posse 1999 and ‘ste’ indicates using the method of Poser 2006
- mask ((S,) array_like) – Boolean mask array
- stabilize (
bool
) – Whether to attempt to stabilize convergence of ICA by returning dimensionally-reduced data from PCA and component selection. - ref_img (
str
or img_like) – Reference image to dictate how outputs are saved to disk - tes (
list
) – List of echo times associated with catd, in milliseconds - kdaw (
float
) – Dimensionality augmentation weight for Kappa calculations - rdaw (
float
) – Dimensionality augmentation weight for Rho calculations - ste (
int
orlist
ofint
, optional) – Which echos to use in PCA. Values -1 and 0 are special, where a value of -1 will indicate using all the echos and 0 will indicate using the optimal combination of the echos. A list can be provided to indicate a subset of echos. Default: 0 - mlepca (
bool
, optional) – Whether to use the method originally explained in Minka, NIPS 2000 for guessing PCA dimensionality instead of a traditional SVD. Default: True - wvpca (
bool
, optional) – Whether to apply wavelet denoising to data. Default: False
Returns: - n_components (
int
) – Number of components retained from PCA decomposition - dd ((S x E x T)
numpy.ndarray
) – Dimensionally-reduced functional data
Notes
Notation Meaning Component pseudo-F statistic for TE-dependent (BOLD) model. Component pseudo-F statistic for TE-independent (artifact) model. Voxel Total number of voxels in mask Something Component Something else Steps:
Variance normalize either multi-echo or optimally combined data, depending on settings.
Decompose normalized data using PCA or SVD.
Compute and :
Some other stuff. Something about elbows.
Classify components as thermal noise if they meet both of the following criteria:
- Nonsignificant and .
- Nonsignificant variance explained.
Outputs:
This function writes out several files:
Filename Content pcastate.pkl Values from PCA results. comp_table_pca.txt PCA component table. mepca_mix.1D PCA mixing matrix.