Configuration class for the nonnegative-matrix-factorization algorithm. Specify tolerances, maximum iteration counts, etc., here.  
 More...
#include <nmf_operations.hpp>
Configuration class for the nonnegative-matrix-factorization algorithm. Specify tolerances, maximum iteration counts, etc., here. 
- Examples: 
- nmf.cpp.
Definition at line 39 of file nmf_operations.hpp.
  
  | 
        
          | viennacl::linalg::nmf_config::nmf_config | ( | double | val_epsilon = 1e-4, |  
          |  |  | double | val_epsilon_stagnation = 1e-5, |  
          |  |  | vcl_size_t | num_max_iters = 10000, |  
          |  |  | vcl_size_t | num_check_iters = 100 |  
          |  | ) |  |  |  | inline | 
 
 
  
  | 
        
          | vcl_size_t viennacl::linalg::nmf_config::check_after_steps | ( |  | ) | const |  | inline | 
 
Number of steps after which the convergence of NMF should be checked (again) 
Definition at line 91 of file nmf_operations.hpp.
 
 
  
  | 
        
          | void viennacl::linalg::nmf_config::check_after_steps | ( | vcl_size_t | c | ) |  |  | inline | 
 
Set the number of steps after which the convergence of NMF should be checked (again) 
Definition at line 96 of file nmf_operations.hpp.
 
 
  
  | 
        
          | vcl_size_t viennacl::linalg::nmf_config::iters | ( |  | ) | const |  | inline | 
 
Returns the number of iterations of the last NMF run using this configuration object. 
Definition at line 85 of file nmf_operations.hpp.
 
 
  
  | 
        
          | vcl_size_t viennacl::linalg::nmf_config::max_iterations | ( |  | ) | const |  | inline | 
 
 
  
  | 
        
          | void viennacl::linalg::nmf_config::max_iterations | ( | vcl_size_t | m | ) |  |  | inline | 
 
Sets the maximum number of iterations for the NMF algorithm. 
Definition at line 79 of file nmf_operations.hpp.
 
 
  
  | 
        
          | bool viennacl::linalg::nmf_config::print_relative_error | ( |  | ) | const |  | inline | 
 
Returns the flag specifying whether the relative tolerance should be printed in each iteration. 
- Examples: 
- nmf.cpp.
Definition at line 103 of file nmf_operations.hpp.
 
 
  
  | 
        
          | void viennacl::linalg::nmf_config::print_relative_error | ( | bool | b | ) |  |  | inline | 
 
Specify whether the relative error should be printed at each convergence check after 'num_check_iters' steps. 
Definition at line 108 of file nmf_operations.hpp.
 
 
  
  | 
        
          | double viennacl::linalg::nmf_config::stagnation_tolerance | ( |  | ) | const |  | inline | 
 
 
  
  | 
        
          | void viennacl::linalg::nmf_config::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) 
Definition at line 68 of file nmf_operations.hpp.
 
 
  
  | 
        
          | double viennacl::linalg::nmf_config::tolerance | ( |  | ) | const |  | inline | 
 
 
  
  | 
        
          | void viennacl::linalg::nmf_config::tolerance | ( | double | e | ) |  |  | inline | 
 
Sets the relative tolerance for convergence, i.e. norm(V - W * H) / norm(V - W_init * H_init) 
Definition at line 56 of file nmf_operations.hpp.
 
 
template<typename ScalarType > 
 
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 |  
 
Definition at line 59 of file nmf_operations.hpp.
 
 
The documentation for this class was generated from the following file: