Description Usage Arguments Details Value References Examples
Calculates the data covariance matrix of the original data. Returns eigenvectors (and eigenvalues) of the covariance matrix as an 'imageset_ef' object.
1 |
td |
an object of class 'imageset_ef', training data. |
showEigenvals |
logical vector (TRUE or FALSE). |
quick |
logical vector (TRUE or FALSE). |
td
is the 'imageset_ef'-object where the images are saved as 'image_ef' objects. showEigenvals
determins
whether the eigenvalues are returned in addition to the eigenvectors (FALSE means only the eigenvectors are returned).
When the number of pixels of each images is much bigger than the number of images in td
it is faster to diagonalize t(A) %*% A
instead of the covariance matrix. However, this causes that only a subset of the eigenvectors of the covariance matrix is returned.
If quick is set TRUE, this option is activated.
list of length 1 (when showEigenvals <- FALSE; contains an 'imageset_ef' object consisting of the eigenvectors as 'image_ef' objects) or 2 (when showEigenvals <- TRUE; additionally contains a list of the eigenvalues).
Marinovsky F., Wagner P., Gesichtserkennung mit Eigenfaces, FH Zittau/Görlitz
1 2 3 4 | # Import Olivetti-faces
olivetti <- system.file("extdata","olivetti_X.csv",package="eigenfaces")
td <- load_imageset_ef(olivetti, c(64,64))
PCA(td, showEigenvals = FALSE, quick=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.