Configuration class for the nonnegative-matrix-factorization algorithm. Specify tolerances, maximum iteration counts, etc., here.
More...
#include <nmf.hpp>
|
template<typename ScalarType > |
void | nmf (viennacl::matrix< ScalarType > const &V, viennacl::matrix< ScalarType > &W, viennacl::matrix< ScalarType > &H, nmf_config const &conf) |
| The nonnegative matrix factorization (approximation) algorithm as suggested by Lee and Seung. Factorizes a matrix V with nonnegative entries into matrices W and H such that ||V - W*H|| is minimized. More...
|
|
Configuration class for the nonnegative-matrix-factorization algorithm. Specify tolerances, maximum iteration counts, etc., here.
Number of steps after which the convergence of NMF should be checked (again)
Set the number of steps after which the convergence of NMF should be checked (again)
Returns the number of iterations of the last NMF run using this configuration object.
Returns the maximum number of iterations for the NMF algorithm.
Sets the maximum number of iterations for the NMF algorithm.
bool print_relative_error |
( |
| ) |
const |
|
inline |
Returns the flag specifying whether the relative tolerance should be printed in each iteration.
void print_relative_error |
( |
bool |
b | ) |
|
|
inline |
Specify whether the relative error should be printed at each convergence check after 'num_check_iters' steps.
double stagnation_tolerance |
( |
| ) |
const |
|
inline |
Relative tolerance for the stagnation check.
void stagnation_tolerance |
( |
double |
e | ) |
|
|
inline |
Sets the tolerance for the stagnation check (i.e. the minimum required relative change of the residual between two iterations)
double tolerance |
( |
| ) |
const |
|
inline |
Returns the relative tolerance for convergence.
void tolerance |
( |
double |
e | ) |
|
|
inline |
Sets the relative tolerance for convergence, i.e. norm(V - W * H) / norm(V - W_init * H_init)
The nonnegative matrix factorization (approximation) algorithm as suggested by Lee and Seung. Factorizes a matrix V with nonnegative entries into matrices W and H such that ||V - W*H|| is minimized.
- Parameters
-
V | Input matrix |
W | First factor |
H | Second factor |
conf | A configuration object holding tolerances and the like |
The documentation for this class was generated from the following file:
- /tmp/buildd/viennacl-1.5.1/viennacl/linalg/nmf.hpp