![]() |
planc
Parallel Lowrank Approximation with Non-negativity Constraints
|
#include <distanlsbpp.hpp>
Public Member Functions | |
DistANLSBPP (const INPUTMATTYPE &input, const MAT &leftlowrankfactor, const MAT &rightlowrankfactor, const MPICommunicator &communicator, const int numkblks) | |
~DistANLSBPP () | |
void | distWtA () |
This is a matrix multiplication routine based on reduce_scatter. More... | |
void | distWtABlock () |
void | distAH () |
There are totally prxpc process. More... | |
void | distAHBlock () |
void | distInnerProduct (const MAT &X, MAT *XtX) |
There are p processes. More... | |
void | computeNMF () |
This is the main loop function Refer Algorithm 1 in Page 3 of the PPoPP HPC-NMF paper. More... | |
void | computeError (const int it) |
We assume this error function will be called in every iteration before updating the block to compute the error from previous iteration ![]() ![]() ![]() | |
void | computeError2 (const int it) |
const int | globalm () const |
returns globalm More... | |
const int | globaln () const |
returns globaln More... | |
const double | globalsqnorma () const |
returns global squared norm of A More... | |
void | compute_error (const uint &ce) |
return the current error More... | |
const bool | is_compute_error () const |
returns the flag to compute error or not. More... | |
void | algorithm (algotype dat) |
returns the NMF algorithm More... | |
void | reportTime (const double temp, const std::string &reportstring) |
Reports the time. More... | |
void | normalize_by_W () |
Column Normalizes the distributed W matrix. More... | |
MAT | getLeftLowRankFactor () |
Returns the left low rank factor matrix W. More... | |
MAT | getRightLowRankFactor () |
Returns the right low rank factor matrix H. More... | |
void | computeObjectiveError () |
void | computeObjectiveError (const INPUTMATTYPE &At, const MAT &WtW, const MAT &HtH) |
void | num_iterations (const int it) |
Sets number of iterations for the NMF algorithms. More... | |
const unsigned int | num_iterations () const |
Returns the number of iterations. More... | |
void | regW (const FVEC &iregW) |
Sets the regularization on left low rank factor W. More... | |
FVEC | regW () |
Returns the L2 and L1 regularization parameters of W as a vector. More... | |
void | regH (const FVEC &iregH) |
Sets the regularization on right low rank H. More... | |
FVEC | regH () |
Returns the L2 and L1 regularization parameters of W as a vector. More... | |
void | clear () |
Clear the memory for input matrix A, right low rank factor W and left low rank factor H. More... | |
Definition at line 24 of file distanlsbpp.hpp.
|
inline |
Definition at line 108 of file distanlsbpp.hpp.
|
inline |
Definition at line 118 of file distanlsbpp.hpp.
|
inlineinherited |
returns the NMF algorithm
Definition at line 94 of file distnmf.hpp.
|
inlineinherited |
|
inlineinherited |
return the current error
Definition at line 90 of file distnmf.hpp.
|
inlineinherited |
We assume this error function will be called in every iteration before updating the block to compute the error from previous iteration each process owns globalsqnormA will have |A|_F^2 each process owns WtAij is of size
each process owns H is of size
compute WtAij*H and do an MPI_ALL reduce to get the kxk matrix.
every process local computation
|
inlineinherited |
|
inlinevirtualinherited |
This is the main loop function Refer Algorithm 1 in Page 3 of the PPoPP HPC-NMF paper.
Implements planc::NMF< INPUTMATTYPE >.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
There are totally prxpc process.
Each process will hold the following An A of size (m/pr) x (n/pc) H of size (n/p)xk find AHt kx(m/p) by reducing and scatter it using MPI_Reduce_scatter call. That is, p process will hold a kx(m/p) matrix. this->m_mpicomm.comm_subs()[0] is column communicator. this->m_mpicomm.comm_subs()[1] is row communicator. To preserve the memory for Hj, we collect only partial k
|
inlineinherited |
|
inlineinherited |
There are p processes.
Every process i has W in m_i * k At the end of this call, all process will have WtW of size k*k is symmetric. So not to worry about column/row major formats.
[in] | X | is of size m_i x k |
[out] | XtX | Every process owns the same kxk global gram matrix of X |
|
inlineinherited |
This is a matrix multiplication routine based on reduce_scatter.
A is mxn in column major ordering W is mxk in column major ordering AtW is nxk in column major ordering There are totally p processes. Every process has A_i as m_i * n W_i as m_i * k AtW_i as n_i * k this->m_mpicomm.comm_subs()[0] is column communicator. this->m_mpicomm.comm_subs()[1] is row communicator.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
returns globalm
Definition at line 84 of file distnmf.hpp.
|
inlineinherited |
returns globaln
Definition at line 86 of file distnmf.hpp.
|
inlineinherited |
returns global squared norm of A
Definition at line 88 of file distnmf.hpp.
|
inlineinherited |
returns the flag to compute error or not.
Definition at line 92 of file distnmf.hpp.
|
inlineinherited |
Column Normalizes the distributed W matrix.
Definition at line 110 of file distnmf.hpp.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Reports the time.
Definition at line 96 of file distnmf.hpp.