|
|
|
# Non-negative Matrix Factorization
|
|
|
|
|
|
|
|
An implementation of non-negative matrix factorization. This can be used to decompose an input dataset into two low-rank non-negative components.
|
|
|
|
|
|
|
|
# Available Predicates
|
|
|
|
|
|
|
|
* [nmf/13](/PrologMethods/Misc.%20other/nmf#nmf13)
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
[links/resources](/PrologMethods/Misc.%20other/nmf#connected-linksresources)
|
|
|
|
|
|
|
|
## **_nmf/13_**
|
|
|
|
|
|
|
|
Initilizes the nmf model and applies it to the given data.
|
|
|
|
|
|
|
|
```prolog
|
|
|
|
%% part of the predicate definition
|
|
|
|
nmf( +string,
|
|
|
|
+integer, +float32,
|
|
|
|
+pointer(float_array), +integer, +integer,
|
|
|
|
+integer,
|
|
|
|
-pointer(float_array), -integer, -integer,
|
|
|
|
-pointer(float_array), -integer, -integer).
|
|
|
|
```
|
|
|
|
|
|
|
|
### Parameters
|
|
|
|
| Name | Type | Description | Default |
|
|
|
|
|------|------|-------------|---------|
|
|
|
|
| updateRule | +string | Update rules for each iteration: "multdist", "multdiv", "als" . | multdist |
|
|
|
|
| maxIterations | +integer | Number of iterations before NMF terminates (0 runs until convergence. | 10000 |
|
|
|
|
| minResidue | +float | The minimum root mean square residue allowed for each iteration, below which the program terminates. | 1e-5 |
|
|
|
|
| data | +matrix | Input matrix to be factorized. | - |
|
|
|
|
| rank | +integer | Rank r of the factorization. | - |
|
|
|
|
| W | -matrix | Basis matrix to be output. | - |
|
|
|
|
| H | -matrix | Encoding matrix to output. | - |
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
# Connected Links/Resources
|
|
|
|
|
|
|
|
If you want a more detailed explanation, then go to the python documentation. There is most of the time a good explanation on how the methods work and what the parameters do.
|
|
|
|
|
|
|
|
* [MLpack::nmf_C++\_documentation](https://www.mlpack.org/doc/stable/doxygen/classmlpack_1_1amf_1_1AMF.html)
|
|
|
|
* [MLpack::nmf_Python_documentation](https://www.mlpack.org/doc/stable/python_documentation.html#nmf)
|
|
|
|
|
|
|
|
added some of the links from the python documentation
|
|
|
|
|
|
|
|
* cf
|
|
|
|
* [Non-negative matrix factorization on Wikipedia](https://en.wikipedia.org/wiki/Non-negative_matrix_factorization)
|
|
|
|
* [Algorithms for non-negative matrix factorization (pdf)](http://papers.nips.cc/paper/1861-algorithms-for-non-negative-matrix-factorization.pdf) |
|
|
|
\ No newline at end of file |