1 #ifndef VIENNACL_LINALG_NMF_HPP
2 #define VIENNACL_LINALG_NMF_HPP
35 #ifdef VIENNACL_WITH_OPENCL
40 #ifdef VIENNACL_WITH_CUDA
56 template<
typename ScalarType>
60 assert(V.
size1() == W.
size1() && V.
size2() == H.
size2() && bool(
"Dimensions of W and H don't allow for V = W * H"));
61 assert(W.
size2() == H.
size1() && bool(
"Dimensions of W and H don't match, prod(W, H) impossible"));
68 #ifdef VIENNACL_WITH_OPENCL
74 #ifdef VIENNACL_WITH_CUDA
void nmf(viennacl::matrix_base< NumericT > const &V, viennacl::matrix_base< NumericT > &W, viennacl::matrix_base< NumericT > &H, viennacl::linalg::nmf_config const &conf)
The nonnegative matrix factorization (approximation) algorithm as suggested by Lee and Seung...
Generic interface for the l^2-norm. See viennacl/linalg/vector_operations.hpp for implementations...
Exception class in case of memory errors.
void nmf(viennacl::matrix_base< NumericT > const &V, viennacl::matrix_base< NumericT > &W, viennacl::matrix_base< NumericT > &H, viennacl::linalg::nmf_config const &conf)
The nonnegative matrix factorization (approximation) algorithm as suggested by Lee and Seung...
Generic interface for matrix-vector and matrix-matrix products. See viennacl/linalg/vector_operations...
Implementation of the dense matrix class.
Configuration class for the nonnegative-matrix-factorization algorithm. Specify tolerances, maximum iteration counts, etc., here.
void nmf(viennacl::matrix_base< NumericT > const &V, viennacl::matrix_base< NumericT > &W, viennacl::matrix_base< NumericT > &H, viennacl::linalg::nmf_config const &conf)
The nonnegative matrix factorization (approximation) algorithm as suggested by Lee and Seung...
Generic interface for the Frobenius norm.
size_type size2() const
Returns the number of columns.
size_type size1() const
Returns the number of rows.
The vector type with operator-overloads and proxy classes is defined here. Linear algebra operations ...
void nmf(viennacl::matrix_base< ScalarType > const &V, viennacl::matrix_base< ScalarType > &W, viennacl::matrix_base< ScalarType > &H, viennacl::linalg::nmf_config const &conf)
The nonnegative matrix factorization (approximation) algorithm as suggested by Lee and Seung...
OpenCL kernel file for nonnegative matrix factorization.
viennacl::backend::mem_handle & handle(T &obj)
Returns the generic memory handle of an object. Non-const version.
memory_types get_active_handle_id() const
Returns an ID for the currently active memory buffer. Other memory buffers might contain old or no da...