.\" Text automatically generated by txt2man .TH mlpack_nmf 1 "11 January 2024" "mlpack-4.3.0" "User Commands" .SH NAME \fBmlpack_nmf \fP- non-negative matrix factorization .SH SYNOPSIS .nf .fam C \fBmlpack_nmf\fP \fB-i\fP \fIunknown\fP \fB-r\fP \fIint\fP [\fB-q\fP \fIunknown\fP] [\fB-p\fP \fIunknown\fP] [\fB-m\fP \fIint\fP] [\fB-e\fP \fIdouble\fP] [\fB-s\fP \fIint\fP] [\fB-u\fP \fIstring\fP] [\fB-V\fP \fIbool\fP] [\fB-H\fP \fIunknown\fP] [\fB-W\fP \fIunknown\fP] [\fB-h\fP \fB-v\fP] .fam T .fi .fam T .fi .SH DESCRIPTION This program performs non-negative matrix factorization on the given dataset, storing the resulting decomposed matrices in the specified files. For an input dataset V, NMF decomposes V into two matrices W and H such that .PP V = W * H .PP where all elements in W and H are non-negative. If V is of size (n x m), then W will be of size (n x r) and H will be of size (r x m), where r is the rank of the factorization (specified by the '\fB--rank\fP (\fB-r\fP)' parameter). .PP Optionally, the desired update rules for each NMF iteration can be chosen from the following list: .RS .IP \(bu 3 multdist: multiplicative distance-based update rules (Lee and Seung 1999) .IP \(bu 3 multdiv: multiplicative divergence-based update rules (Lee and Seung 1999) .IP \(bu 3 als: alternating least squares update rules (Paatero and Tapper 1994) .RE .PP The maximum number of iterations is specified with '\fB--max_iterations\fP (\fB-m\fP)', and the minimum residue required for algorithm termination is specified with the '\fB--min_residue\fP (\fB-e\fP)' parameter. .PP For example, to run NMF on the input matrix 'V.csv' using the 'multdist' update rules with a rank-10 decomposition and storing the decomposed matrices into 'W.csv' and 'H.csv', the following command could be used: .PP $ \fBmlpack_nmf\fP \fB--input_file\fP V.csv \fB--w_file\fP W.csv \fB--h_file\fP H.csv \fB--rank\fP 10 \fB--update_rules\fP multdist .RE .PP .SH REQUIRED INPUT OPTIONS .TP .B \fB--input_file\fP (\fB-i\fP) [\fIunknown\fP] Input dataset to perform NMF on. .TP .B \fB--rank\fP (\fB-r\fP) [\fIint\fP] Rank of the factorization. .SH OPTIONAL INPUT OPTIONS .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--initial_h_file\fP (\fB-q\fP) [\fIunknown\fP] Initial H matrix. .TP .B \fB--initial_w_file\fP (\fB-p\fP) [\fIunknown\fP] Initial W matrix. .TP .B \fB--max_iterations\fP (\fB-m\fP) [\fIint\fP] Number of iterations before NMF terminates (0 runs until convergence. Default value 10000. .TP .B \fB--min_residue\fP (\fB-e\fP) [\fIdouble\fP] The minimum root mean square residue allowed for each iteration, below which the program terminates. Default value 1e-05. .TP .B \fB--seed\fP (\fB-s\fP) [\fIint\fP] Random seed. If 0, 'std::time(NULL)' is used. Default value 0. \fB--update_rules\fP (\fB-u\fP) [\fIstring\fP] Update rules for each iteration; ( multdist | multdiv | als ). Default value 'multdist'. .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--h_file\fP (\fB-H\fP) [\fIunknown\fP] Matrix to save the calculated H to. .TP .B \fB--w_file\fP (\fB-W\fP) [\fIunknown\fP] Matrix to save the calculated W 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.