est.pcathr | R Documentation |
Principal Component Analysis exploits sample covariance matrix whose
eigenvectors and eigenvalues are principal components and projected
variance, correspondingly. Given varratio
, it thresholds the
accumulated variance and selects the estimated dimension. Note that other than
linear submanifold case, the naive selection scheme from this algorithm
lacks flexibility in discovering intrinsic dimension.
est.pcathr(X, varratio = 0.95)
X |
an (n\times p) matrix or data frame whose rows are observations. |
varratio |
target explainability for accumulated variance in (0,1). |
a named list containing containing
estimated dimension according to varratio
.
eigenvalues of sample covariance matrix.
Kisung You
do.pca
## generate 3-dimensional normal data X = matrix(rnorm(100*3), nrow=100) ## replicate 3 times with translations Y = cbind(X-10,X,X+10) ## use PCA thresholding estimation with 95% variance explainability ## desired return is for dimension 3. output = est.pcathr(Y) pmessage = paste("* estimated dimension is ",output$estdim, sep="") print(pmessage) ## use screeplot opar <- par(no.readonly=TRUE) plot(output$values, main="scree plot", type="b") par(opar)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.