mlpack_nmf(1)
π mlpack_nmf β non-negative matrix factorization π
okay so bestie, this is mlpack_nmf(1), it lives in the User Commands section and it is literally about to change your whole matrix life, no cap β¨
β¨ NAME β¨
mlpack_nmf β non-negative matrix factorization π¦
πΈ SYNOPSIS πΈ
mlpack_nmf -i unknown -r int [-q unknown] [-p unknown] [-m int] [-e double] [-s int] [-u string] [-V bool] [-H unknown] [-W unknown] [-h -v]
π DESCRIPTION π
so basically, this program performs non-negative matrix factorization on whatever dataset you hand it, and then it stores the resulting decomposed matrices in the files you specify. π«Ά
for an input dataset V, NMF decomposes V into two matrices W and H such that
V = W * H
where all elements in W and H are non-negative. periodt, that's the whole vibe.
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 β and you specify that with the --rank (-r) parameter. π
optionally, the desired update rules for each NMF iteration can be chosen from the following list:
- multdist: multiplicative distance-based update rules (Lee and Seung 1999)
- multdiv: multiplicative divergence-based update rules (Lee and Seung 1999)
- als: alternating least squares update rules (Paatero and Tapper 1994)
the maximum number of iterations is specified with --max_iterations (-m), and the minimum residue required for algorithm termination is specified with the --min_residue (-e) parameter. π
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:
$ mlpack_nmf --input_file V.csv --w_file W.csv --h_file H.csv --rank 10 --update_rules multdist
iconic. ate. π
π REQUIRED INPUT OPTIONS π
these ones are not optional bestie, you genuinely cannot skip them:
--input_file(-i) [unknown] β the input dataset to perform NMF on. yes queen, give it your data.--rank(-r) [int] β the rank of the factorization. π
β OPTIONAL INPUT OPTIONS β
extra little knobs, take them or leave them:
--help(-h) [bool] β default help info. π--info[string] β print help on a specific option. default value is''.--initial_h_file(-q) [unknown] β initial H matrix.--initial_w_file(-p) [unknown] β initial W matrix.--max_iterations(-m) [int] β number of iterations before NMF terminates (0runs until convergence). default value10000. β³--min_residue(-e) [double] β the minimum root mean square residue allowed for each iteration, below which the program terminates. default value1e-05.--seed(-s) [int] β random seed. if0,std::time(NULL)is used. default value0. π²--update_rules(-u) [string] β update rules for each iteration; (multdist|multdiv|als). default value'multdist'.--verbose(-v) [bool] β display informational messages and the full list of parameters and timers at the end of execution. π’--version(-V) [bool] β display the version of mlpack. π
π₯ OPTIONAL OUTPUT OPTIONS π₯
where your beautiful results go:
--h_file(-H) [unknown] β matrix to save the calculated H to. π--w_file(-W) [unknown] β matrix to save the calculated W to. π
π 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. π
ngl bestie, the non-negativity thing is the whole point β don't come at it with negative numbers and then act surprised. π
and that's the whole page, mwah π§ this was mlpack-4.8.0, dated 22 June 2026 β mlpack_nmf(1), signing off. slay responsibly π β¨
π¦ where this page comes from
- ubuntu stonking: mlpack-bin 4.8.0-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms