Version: 1.0.0
Copyright: Maximilian Behr
License: The software is licensed under under MIT. See LICENSE
for details.
cuNMF
is a CUDA
library implementing multiplicative update rules for the nonnegative matrix factorization
cuNMF
supports real single and double precision matrices.
int cunmf_info_create(cunmf_info* info);
int cunmf_info_destroy(cunmf_info info);
int cunmf_options_screate(cunmf_options* opt);
int cunmf_options_sdestroy(cunmf_options opt);
int cunmf_sMUbeta_buffersize(int m, int n, int k, double beta, size_t* bufferSize);
int cunmf_sMUbeta(int m, int n, int k, double beta, const float* X, void* buffer, const cunmf_options opt, float* W, float* H, cunmf_info info);
int cunmf_options_dcreate(cunmf_options* opt);
int cunmf_options_ddestroy(cunmf_options opt);
int cunmf_dMUbeta_buffersize(int m, int n, int k, double beta, size_t* bufferSize);
int cunmf_dMUbeta(int m, int n, int k, double beta, const float* X, void* buffer, const cunmf_options opt, float* W, float* H, cunmf_info info);
cuNMF
implements the multiplicative update rules to minimize the
In more details, we consider the optimization problem
where
The case
Gillis, Nicolas. Nonnegative matrix factorization. Society for Industrial and Applied Mathematics, 2020.
Prerequisites:
CMake >= 3.23
CUDA >= 11.4.2
mkdir build && cd build
cmake ..
make
make install
The multiplicate update algorithm is an iterative ones. The initial iterates
- number of iterations (
maxiter
) - computational time (
maxtime
) - relative change of the iterates
$W$ and$H$ (tol_relchange_WH
) - relative change of the objective
$D_{\beta}$ (tol_relchange_objective
).
See example_cunmf_MUbeta.cu
for an example using double precision data.