Description Usage Arguments Details Value References See Also
View source: R/lsspca_blocked.R
Each component, the variables are selected so as to explain a percentage alpha of the variance explained by the corresponding principal component. blocks_list is a list containing the indeies for each component, Subsets can be overlapping and need not be exhaustive.
1 2 3 4 5 | lsspca_blocked(X, alpha = 0.95, blocks_list = list(),
ncomps_per_block = 1, blocks_names = NA, maxcard = 0,
spcaMethod = c("u", "c", "p"), scalex = FALSE,
variableSelection = c("exhaustive", "seqrep", "backward", "forward", "lasso"),
lsspca_forLasso = FALSE, lasso_penalty = 0.5, rtn_all_spca = FALSE)
|
X |
the data matrix. |
alpha |
Real (or vector) in [0,1]. percentage of variance of the PCs explained by the sparse component. |
blocks_list |
a list of indices or a vector or factor of codes for each block |
ncomps_per_block |
number of components per block, integer or vector of. Default = 1. |
blocks_names |
names of each block, if possible names are taken for the names of blocks_list |
maxcard |
a vector or an integer of maximal cardinality for each block, if USPCA selected maxcard[j] cannot be < j |
spcaMethod |
char how lsspca is computed "u" = USPCA (default), "c" = CSPCA, "p" = PSPCA |
scalex |
Logical, if TRUE variables are scaled to unit variance.default FALSE Variables are automatically centered to zero if they aren't already. |
variableSelection |
how the variables in each components are selected
"exhaustive" = all subsets, "seqrep" = stepwise, "backward", "forward", "lasso".
See documentation in packages |
lsspca_forLasso |
use lsspca with indeies selected with lasso, otherwise just the lasso regression |
lasso_penalty |
real between 0 and 1, , 0-> ridge regression, 1 -> lasso |
rtn_all_spca |
logical, should the lsspca results for each blovck be returned? |
Differently from the lsspca function, the components are computed so as to explain a given percentage of the variance explained by the PCs of the blocks of variables under consideration.
a list
Matrix with the loadings scaled to unit L_2 norm.
Matrix of loadings scaled to unit L_1 norm.
integer number of components computed. Default is 4.
Vector with the cardinalities of each loadings.
List with the indices of the non-zero loadings for each component.
A list with only the nonzero ladings for each component.
Vector with the % variance explained by each component.
Vector with the % variance explained by each principal component.
Vector with the % cumulative variance explained by each component.
Vector with the % proportion of cumulative variance explained by each component to that explained by the PCs.
the SPCs scores.
Matrix with the PCs loadings scaled to unit L_2 norm.
the PCs scores.
method used to compute the loadings
Matrix of correlations among the sparse components. Only if ncomps > 1.
The called with its arguments.
Giovanni M. Merola. 2014. Least Squares Sparse Principal
Component Analysis: a Backward Elimination approach to attain large
loadings. Austr.&NZ Jou. Stats. 57, pp 391-429
Giovanni M. Merola and Gemai Chen. 2019. Sparse Principal Component Analysis: an
efficient Least Squares approach. Jou. Multiv. Analysis 173, pp 366–382
http://arxiv.org/abs/1406.1381
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.