View source: R/tab_dimensionreduction.R
permuteExplVar | R Documentation |
The function permuteExplVar
determines the explained variance of the
permuted expression matrix (x
). It is used to determine the optimal
number of PCs for tSNE.
permuteExplVar(x, n = 10, center = TRUE, scale = TRUE, sample_n = NULL)
x |
|
n |
|
center |
|
scale |
|
sample_n |
|
For the input of tSNE, typically, we want to reduce the initial number of
dimensions linearly with PCA (used as the initial_dims
arguments in
the Rtsne
funtion). The reduced data set is used for feeding
into tSNE. By plotting the percentage of variance explained by the Princical
Components (PCs) we can estimate how many PCs we keep as input into tSNE.
However, if we select too many PCs, noise will be included as input to tSNE;
if we select too few PCs we might loose the important data structures.
To get a better understanding how many PCs to include, randomization will
be employed and the observed variance will be compared to the permuted
variance.
matrix with explained variance
Thomas Naake
x <- matrix(seq_len(100), nrow = 10, ncol = 10,
dimnames = list(seq_len(10), paste("sample", seq_len(10))))
permuteExplVar(x = x, n = 10, center = TRUE, scale = TRUE, sample_n = NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.