GivenInitialization Class Reference

This initialization rule for AMF simply fills the W and H matrices with the matrices given to the constructor of this object. More...

Public Member Functions

 GivenInitialization ()
 
 GivenInitialization (const arma::mat &w, const arma::mat &h)
 
 GivenInitialization (const arma::mat &&w, const arma::mat &&h)
 
 GivenInitialization (const arma::mat &m, const bool whichMatrix=true)
 
 GivenInitialization (const arma::mat &&m, const bool whichMatrix=true)
 
template
<
typename
MatType
>
void Initialize (const MatType &V, const size_t r, arma::mat &W, arma::mat &H)
 Fill W and H with given matrices. More...

 
template
<
typename
MatType
>
void InitializeOne (const MatType &V, const size_t r, arma::mat &M, const bool whichMatrix=true)
 Fill W or H with given matrix. More...

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

 

Detailed Description

This initialization rule for AMF simply fills the W and H matrices with the matrices given to the constructor of this object.

Note that this object does not use std::move() during the Initialize() method, so it can be reused for multiple AMF objects, but will incur copies of the W and H matrices.

Definition at line 27 of file given_init.hpp.

Constructor & Destructor Documentation

◆ GivenInitialization() [1/5]

GivenInitialization ( )
inline

Definition at line 31 of file given_init.hpp.

◆ GivenInitialization() [2/5]

GivenInitialization ( const arma::mat &  w,
const arma::mat &  h 
)
inline

Definition at line 34 of file given_init.hpp.

◆ GivenInitialization() [3/5]

GivenInitialization ( const arma::mat &&  w,
const arma::mat &&  h 
)
inline

Definition at line 39 of file given_init.hpp.

◆ GivenInitialization() [4/5]

GivenInitialization ( const arma::mat &  m,
const bool  whichMatrix = true 
)
inline

Definition at line 47 of file given_init.hpp.

◆ GivenInitialization() [5/5]

GivenInitialization ( const arma::mat &&  m,
const bool  whichMatrix = true 
)
inline

Definition at line 64 of file given_init.hpp.

Member Function Documentation

◆ Initialize()

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

Fill W and H with given matrices.

Parameters
VInput matrix.
rRank of decomposition.
WW matrix, to be initialized to given matrix.
HH matrix, to be initialized to given matrix.

Definition at line 89 of file given_init.hpp.

References Log::Fatal.

◆ InitializeOne()

void InitializeOne ( const MatType &  V,
const size_t  r,
arma::mat &  M,
const bool  whichMatrix = true 
)
inline

Fill W or H with given matrix.

Parameters
VInput matrix.
rRank of decomposition.
MW or H matrix, to be initialized to given matrix.
whichMatrixIf true, initialize W. Otherwise, initialize H.

Definition at line 144 of file given_init.hpp.

References Log::Fatal.

◆ serialize()

void serialize ( Archive &  ar,
const uint32_t   
)
inline

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

Definition at line 203 of file given_init.hpp.


The documentation for this class was generated from the following file:
  • /home/ryan/src/mlpack.org/_src/mlpack-git/src/mlpack/methods/amf/init_rules/given_init.hpp