.\" Text automatically generated by txt2man .TH mlpack_local_coordinate_coding 1 "11 January 2024" "mlpack-4.3.0" "User Commands" .SH NAME \fBmlpack_local_coordinate_coding \fP- local coordinate coding .SH SYNOPSIS .nf .fam C \fBmlpack_local_coordinate_coding\fP [\fB-k\fP \fIint\fP] [\fB-i\fP \fIunknown\fP] [\fB-m\fP \fIunknown\fP] [\fB-l\fP \fIdouble\fP] [\fB-n\fP \fIint\fP] [\fB-N\fP \fIbool\fP] [\fB-s\fP \fIint\fP] [\fB-T\fP \fIunknown\fP] [\fB-o\fP \fIdouble\fP] [\fB-t\fP \fIunknown\fP] [\fB-V\fP \fIbool\fP] [\fB-c\fP \fIunknown\fP] [\fB-d\fP \fIunknown\fP] [\fB-M\fP \fIunknown\fP] [\fB-h\fP \fB-v\fP] .fam T .fi .fam T .fi .SH DESCRIPTION An implementation of Local Coordinate Coding (LCC), which codes data that approximately lives on a manifold using a variation of l1-norm regularized sparse coding. Given a dense data matrix X with n points and d dimensions, LCC seeks to find a dense dictionary matrix D with k atoms in d dimensions, and a coding matrix Z with n points in k dimensions. Because of the regularization method used, the atoms in D should lie close to the manifold on which the data points lie. .PP The original data matrix X can then be reconstructed as D * Z. Therefore, this program finds a representation of each point in X as a sparse linear combination of atoms in the dictionary D. .PP The coding is found with an algorithm which alternates between a dictionary step, which updates the dictionary D, and a coding step, which updates the coding matrix Z. .PP To run this program, the input matrix X must be specified (with \fB-i\fP), along with the number of atoms in the dictionary (\fB-k\fP). An initial dictionary may also be specified with the '\fB--initial_dictionary_file\fP (\fB-i\fP)' parameter. The l1-norm regularization parameter is specified with the '\fB--lambda\fP (\fB-l\fP)' parameter. .PP For example, to run LCC on the dataset 'data.csv' using 200 atoms and an l1-regularization parameter of 0.1, saving the dictionary '\fB--dictionary_file\fP (\fB-d\fP)' and the codes into '\fB--codes_file\fP (\fB-c\fP)', use .PP $ \fBmlpack_local_coordinate_coding\fP \fB--training_file\fP data.csv \fB--atoms\fP 200 \fB--lambda\fP 0.1 \fB--dictionary_file\fP dict.csv \fB--codes_file\fP codes.csv .PP The maximum number of iterations may be specified with the '\fB--max_iterations\fP (\fB-n\fP)' parameter. Optionally, the input data matrix X can be normalized before coding with the '\fB--normalize\fP (\fB-N\fP)' parameter. .PP An LCC model may be saved using the '\fB--output_model_file\fP (\fB-M\fP)' output parameter. Then, to encode new points from the dataset 'points.csv' with the previously saved model 'lcc_model.bin', saving the new codes to \(cqnew_codes.csv', the following command can be used: .PP $ \fBmlpack_local_coordinate_coding\fP \fB--input_model_file\fP lcc_model.bin \fB--test_file\fP points.csv \fB--codes_file\fP new_codes.csv .RE .PP .SH OPTIONAL INPUT OPTIONS .TP .B \fB--atoms\fP (\fB-k\fP) [\fIint\fP] Number of atoms in the dictionary. Default value 0. .TP .B \fB--help\fP (\fB-h\fP) [\fIbool\fP] Default help info. .TP .B \fB--info\fP [string] Print help on a specific option. Default value ''. .TP .B \fB--initial_dictionary_file\fP (\fB-i\fP) [\fIunknown\fP] Optional initial dictionary. .TP .B \fB--input_model_file\fP (\fB-m\fP) [\fIunknown\fP] Input LCC model. .TP .B \fB--lambda\fP (\fB-l\fP) [\fIdouble\fP] Weighted l1-norm regularization parameter. Default value 0. .TP .B \fB--max_iterations\fP (\fB-n\fP) [\fIint\fP] Maximum number of iterations for LCC (0 indicates no limit). Default value 0. .TP .B \fB--normalize\fP (\fB-N\fP) [\fIbool\fP] If set, the input data matrix will be normalized before coding. .TP .B \fB--seed\fP (\fB-s\fP) [\fIint\fP] Random seed. If 0, 'std::time(NULL)' is used. Default value 0. .TP .B \fB--test_file\fP (\fB-T\fP) [\fIunknown\fP] Test points to encode. .TP .B \fB--tolerance\fP (\fB-o\fP) [\fIdouble\fP] Tolerance for objective function. Default value 0.01. .TP .B \fB--training_file\fP (\fB-t\fP) [\fIunknown\fP] Matrix of training data (X). .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 .TP .B \fB--codes_file\fP (\fB-c\fP) [\fIunknown\fP] Output codes matrix. .TP .B \fB--dictionary_file\fP (\fB-d\fP) [\fIunknown\fP] Output dictionary matrix. .TP .B \fB--output_model_file\fP (\fB-M\fP) [\fIunknown\fP] Output for trained LCC model. .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.