View source: R/diss_projection.R
| diss_pca | R Documentation |
Creates a configuration object for computing dissimilarity based on Mahalanobis distance in PCA score space.
diss_pca(
ncomp = ncomp_by_var(0.01),
method = c("pca", "pca_nipals"),
center = TRUE,
scale = FALSE,
return_projection = FALSE
)
ncomp |
Component selection method. Can be:
|
method |
Character. PCA algorithm: |
center |
Logical. Center data before projection? Default |
scale |
Logical. Scale data before projection? Default |
return_projection |
Logical. Return the projection object?
Default |
An object of class c("diss_pca", "diss_method").
Component selection: ncomp_by_var, ncomp_by_cumvar,
ncomp_by_opc, ncomp_fixed
Other dissimilarity methods: diss_pls,
diss_correlation, diss_euclidean,
diss_cosine, diss_mahalanobis
# Fixed number of components
diss_pca(ncomp = 10)
diss_pca(ncomp = ncomp_fixed(10))
# Retain components explaining >= 1% variance each (default)
diss_pca(ncomp = ncomp_by_var(0.01))
# Retain components until 99% cumulative variance
diss_pca(ncomp = ncomp_by_cumvar(0.99))
# Optimize using side information (requires Yr)
diss_pca(ncomp = ncomp_by_opc(40))
diss_pca(ncomp = ncomp_by_opc())
# NIPALS algorithm (useful for very large matrices)
diss_pca(ncomp = 10, method = "pca_nipals")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.