mlpack  2.2.5
RandomAcolInitialization< columnsToAverage > Class Template Reference

This class initializes the W matrix of the AMF algorithm by averaging p randomly chosen columns of V. More...

Public Member Functions

 RandomAcolInitialization ()
 
template
<
typename
Archive
>
void Serialize (Archive &, const unsigned int)
 Serialize the object (in this case, there is nothing to serialize). More...

 

Static Public Member Functions

template
<
typename
MatType
>
static void Initialize (const MatType &V, const size_t r, arma::mat &W, arma::mat &H)
 

Detailed Description


template<size_t columnsToAverage = 5>
class mlpack::amf::RandomAcolInitialization< columnsToAverage >

This class initializes the W matrix of the AMF algorithm by averaging p randomly chosen columns of V.

In this case, p is a template parameter. H is then filled using a uniform distribution in the range [0, 1].

This simple initialization is the "random Acol initialization" found in the following paper:

@techreport{langville2014algorithms,
title = {Algorithms, Initializations, and Convergence for the Nonnegative
Matrix Factorization},
author = {Langville, A.N. and Meyer, C.D. and Albright, R. and Cox, J. and
Duling, D.},
year = {2014},
institution = {NCSU Technical Report Math 81706}
}
Template Parameters
columnsToAverageThe number of random columns to average for each column of W.

Definition at line 44 of file random_acol_init.hpp.

Constructor & Destructor Documentation

◆ RandomAcolInitialization()

Definition at line 48 of file random_acol_init.hpp.

Member Function Documentation

◆ Initialize()

static void Initialize ( const MatType &  V,
const size_t  r,
arma::mat &  W,
arma::mat &  H 
)
inlinestatic

Definition at line 52 of file random_acol_init.hpp.

References mlpack::math::RandInt(), and Log::Warn.

◆ Serialize()

void Serialize ( Archive &  ,
const unsigned  int 
)
inline

Serialize the object (in this case, there is nothing to serialize).

Definition at line 88 of file random_acol_init.hpp.


The documentation for this class was generated from the following file: