Description Usage Arguments Value References Examples
The function returns the choice dimension for PCA under the PPCA setup using Laplace approximation.
1 |
lambda |
a numeric vector of sample eigenvalues of the covariance matrix of |
M |
the number of columns of |
verbose |
a logical specifying whether the posterior evidence or the integer that minimized the evidence should be returned |
tau |
a tolerance threshold for the smallest eigenvalue, the default value is 0.001. |
BIC |
a logical indicating whether the Laplace's method or the BIC approximation should be used. |
an integer K between 1 and n that maximizes the posterior evidence by Laplace's method or BIC approximation.
Minka, T. (2000). Automatic choice of dimensionality for PCA. **Advances in neural information processing systems**, *13*, 598-604. [http://dblp.uni-trier.de/db/conf/nips/nips2000.html#Minka00]
1 2 3 4 5 6 7 8 | ## Not run:
X <- MASS::mvrnorm(1000, mu = rep(0,10), Sigma = diag(1,10))
eigen_values <- eigen(as.matrix(Matrix::nearPD(stats::cov(scale(X)))$mat))$val
minka2001(lambda = eigen_values, M = 100, BIC=TRUE)
minka2001(lambda = eigen_values, M = 100, BIC=FALSE)
minka2001(lambda = eigen_values, M = 5000)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.