| dim_reduce | R Documentation |
Performs dimension reduction and prewhitening based on probabilistic PCA using SVD. If dimensionality is not specified, it is estimated using the method described in Minka (2008).
dim_reduce(X, Q = NULL, Q_max = 100)
X |
A numeric matrix, with each column being a centered timeseries.
For fMRI data, |
Q |
Number of latent dimensions to estimate. If |
Q_max |
Maximal number of principal components for automatic
dimensionality selection with PESEL. Default: |
A list containing the dimension-reduced data (data_reduced, a
V \times Q matrix), prewhitening/dimension reduction matrix (H,
a QxT matrix) and its (pseudo-)inverse (Hinv, a TxQ
matrix), the noise variance (sigma_sq), the correlation matrix of the
dimension-reduced data (C_diag, a QxQ matrix), and the
dimensionality (Q).
nT <- 30
nV <- 400
nQ <- 7
X <- matrix(rnorm(nV*nQ), nrow=nV) %*% diag(seq(nQ, 1)) %*% matrix(rnorm(nQ*nT), nrow=nQ)
dim_reduce(X, Q=nQ)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.