View source: R/sparsePCA_helpers.R
sparsity_mixed | R Documentation |
Mixed Sparsity of the Loadings
sparsity_mixed(PC, p, N, k = 1, tolerance = 0.001, mean = "arithmetic")
PC |
matrix-like object of PCs. |
p |
integer, number of variables. |
N |
integer, number of groups. |
k |
integer, which components should be used. Does not work for multiple PCs simultaneously. |
tolerance |
tolerance for sparsity. |
mean |
if |
Returns the geometric mean of the percentage of entry-wise and group-wise sparsity.
PC = matrix(c(1,0,2,3,0,7,0,1,0,1,0.001,0), ncol = 2)
sparsity_mixed(PC, N = 2, p = 3, tolerance = 0, k = 1)
sparsity_mixed(PC, N = 2, p = 3, tolerance = 0.001, k = 2, mean = "geometric")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.