This initialization rule for AMF simply fills the W and H matrices with the matrices given to the constructor of this object.
More...
#include <given_init.hpp>
|
| 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).
|
|
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.
◆ Initialize()
template<typename MatType >
void mlpack::amf::GivenInitialization::Initialize |
( |
const MatType & |
V, |
|
|
const size_t |
r, |
|
|
arma::mat & |
W, |
|
|
arma::mat & |
H |
|
) |
| |
|
inline |
Fill W and H with given matrices.
- Parameters
-
V | Input matrix. |
r | Rank of decomposition. |
W | W matrix, to be initialized to given matrix. |
H | H matrix, to be initialized to given matrix. |
◆ InitializeOne()
template<typename MatType >
void mlpack::amf::GivenInitialization::InitializeOne |
( |
const MatType & |
V, |
|
|
const size_t |
r, |
|
|
arma::mat & |
M, |
|
|
const bool |
whichMatrix = true |
|
) |
| |
|
inline |
Fill W or H with given matrix.
- Parameters
-
V | Input matrix. |
r | Rank of decomposition. |
M | W or H matrix, to be initialized to given matrix. |
whichMatrix | If true, initialize W. Otherwise, initialize H. |
The documentation for this class was generated from the following file: