Description Usage Arguments Value Examples
Compute percent of variance explained
1 | get_pct_var_exp_svd(thissvd, preproc_mat = thissvd$d)
|
thissvd |
list outputted from an svd function (svd, irlba; can also take output from |
preproc_mat |
matrix of pre-processed values (optional) - important to include if the svd is only partial as this is used to compute the sum of eigenvalues |
vector of percent variance explained values, indexed by PC
1 2 3 4 5 | mat <- matrix(sample(seq(0,20,1),100,replace = TRUE),nrow = 10)
my_svd <- svd(mat)
get_pct_var_exp_svd(my_svd) # this works if my_svd is a full svd
my_irl <- irlba::irlba(mat,nv = 2)
get_pct_var_exp_svd(my_irl, preproc_mat = mat) # ... otherwise use this
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.