Description Usage Arguments Details Examples
Computes distance between features(variables) weighing the loadings proportional to corresponding eigenvalues
1 |
model |
Object of class 'prcomp' or 'princomp'. |
... |
Arguments to be passed to 'proxy::dist' |
See the book: 'An introduction to applied multivariate analysis with R' by Everitt (et al) section 3.6 on 'Rescaling the principal components'
1 2 3 4 5 6 7 8 9 10 | pca_iris <- stats::prcomp(scale(iris[,1:4]))
feature_dist_iris <- dist_pca(pca_iris)
feature_dist_iris
plot(stats::hclust(feature_dist_iris))
pca_iris2 <- stats::princomp(covmat = cor(iris[,1:4]), cor = TRUE)
feature_dist_iris2 <- dist_pca(pca_iris2)
feature_dist_iris2
all.equal(feature_dist_iris, feature_dist_iris2)
plot(stats::hclust(feature_dist_iris))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.