.\" Text automatically generated by txt2man .TH mlpack_pca 1 "11 January 2024" "mlpack-4.3.0" "User Commands" .SH NAME \fBmlpack_pca \fP- principal components analysis .SH SYNOPSIS .nf .fam C \fBmlpack_pca\fP \fB-i\fP \fIunknown\fP [\fB-c\fP \fIstring\fP] [\fB-d\fP \fIint\fP] [\fB-s\fP \fIbool\fP] [\fB-r\fP \fIdouble\fP] [\fB-V\fP \fIbool\fP] [\fB-o\fP \fIunknown\fP] [\fB-h\fP \fB-v\fP] .fam T .fi .fam T .fi .SH DESCRIPTION This program performs principal components analysis on the given dataset using the exact, randomized, randomized block Krylov, or QUIC SVD method. It will transform the data onto its principal components, optionally performing dimensionality reduction by ignoring the principal components with the smallest eigenvalues. .PP Use the '\fB--input_file\fP (\fB-i\fP)' parameter to specify the dataset to perform PCA on. A desired new dimensionality can be specified with the \(cq\fB--new_dimensionality\fP (\fB-d\fP)' parameter, or the desired variance to retain can be specified with the '\fB--var_to_retain\fP (\fB-r\fP)' parameter. If desired, the dataset can be scaled before running PCA with the '\fB--scale\fP (\fB-s\fP)' parameter. .PP Multiple different decomposition techniques can be used. The method to use can be specified with the '\fB--decomposition_method\fP (\fB-c\fP)' parameter, and it may take the values 'exact', 'randomized', or 'quic'. .PP For example, to reduce the dimensionality of the matrix 'data.csv' to 5 dimensions using randomized SVD for the decomposition, storing the output matrix to 'data_mod.csv', the following command can be used: .PP $ \fBmlpack_pca\fP \fB--input_file\fP data.csv \fB--new_dimensionality\fP 5 \fB--decomposition_method\fP randomized \fB--output_file\fP data_mod.csv .RE .PP .SH REQUIRED INPUT OPTIONS .TP .B \fB--input_file\fP (\fB-i\fP) [\fIunknown\fP] Input dataset to perform PCA on. .SH OPTIONAL INPUT OPTIONS .TP .B \fB--decomposition_method\fP (\fB-c\fP) [\fIstring\fP] Method used for the principal components analysis: 'exact', 'randomized', 'randomized-block-krylov', 'quic'. Default value 'exact'. .TP .B \fB--help\fP (\fB-h\fP) [\fIbool\fP] Default help info. .TP .B \fB--info\fP [\fIstring\fP] Print help on a specific option. Default value ''. .TP .B \fB--new_dimensionality\fP (\fB-d\fP) [\fIint\fP] Desired dimensionality of output dataset. If 0, no dimensionality reduction is performed. Default value 0. .TP .B \fB--scale\fP (\fB-s\fP) [\fIbool\fP] If set, the data will be scaled before running PCA, such that the variance of each feature is 1. .TP .B \fB--var_to_retain\fP (\fB-r\fP) [\fIdouble\fP] Amount of variance to retain; should be between 0 and 1. If 1, all variance is retained. Overrides \fB-d\fP. Default value 0. .TP .B \fB--verbose\fP (\fB-v\fP) [\fIbool\fP] Display informational messages and the full list of parameters and timers at the end of execution. .TP .B \fB--version\fP (\fB-V\fP) [\fIbool\fP] Display the version of mlpack. .SH OPTIONAL OUTPUT OPTIONS \fB--output_file\fP (\fB-o\fP) [\fIunknown\fP] Matrix to save modified dataset to. .SH ADDITIONAL INFORMATION For further information, including relevant papers, citations, and theory, consult the documentation found at http://www.mlpack.org or included with your distribution of mlpack.