checkArgs {scPCA} | R Documentation |
Check Arguments passed to the scPCA Function
Description
Checks whether or not the all arguments in the scPCA
functions are input properly.
Usage
checkArgs(
target,
background,
center,
scale,
n_eigen,
contrasts,
penalties,
clust_method,
linkage_method,
clusters,
eigdecomp_tol,
eigdecomp_iter,
n_centers,
scaled_matrix
)
Arguments
target |
The target (experimental) data set, in a standard format such
as a data.frame or matrix .
|
background |
The background data set, in a standard format such as a
data.frame or matrix .
|
center |
A logical indicating whether the target and background
data sets should be centered to mean zero.
|
scale |
A logical indicating whether the target and background
data sets should be scaled to unit variance.
|
n_eigen |
A numeric indicating the number of eigenvectors to be
computed.
|
contrasts |
A numeric vector of the contrastive parameters.
|
penalties |
A numeric vector of the penalty terms.
|
clust_method |
A character specifying the clustering method to
use for choosing the optimal constrastive parameter. Currently, this is
limited to either k-means, partitioning around medoids (PAM), and
hierarchical clustering. The default is k-means clustering.
|
linkage_method |
A character specifying the agglomerative
linkage method to be used if clust_method = "hclust" . The options
are ward.D2 , single , complete , average ,
mcquitty , median , and centroid . The default is
complete .
|
clusters |
A numeric vector of cluster labels for observations in
the target data. Defaults to NULL , but is otherwise used to
identify the optimal set of hyperparameters when fitting the scPCA and the
automated version of cPCA.
|
eigdecomp_tol |
A numeric providing the level of precision used by
eigendecompositon calculations.
|
eigdecomp_iter |
A numeric indicating the maximum number of
interations performed by eigendecompositon calculations.
|
n_centers |
A numeric giving the number of centers to use in the
clustering algorithm. If set to 1, cPCA, as first proposed by
Erichson et al. (2018), is performed, regardless of
what the penalties argument is set to.
|
scaled_matrix |
A logical indicating whether to output a
ScaledMatrix object. The centering and scaling
procedure is delayed until later, permitting more efficient matrix
multiplication and row or column sums downstream. However, this comes at the
at the cost of numerical precision.
|
Value
Whether all argument conditions are satisfied
References
Erichson NB, Zeng P, Manohar K, Brunton SL, Kutz JN, Aravkin AY (2018).
“Sparse Principal Component Analysis via Variable Projection.”
ArXiv, abs/1804.00341.
[Package
scPCA version 1.7.3
Index]