This initialization rule initializes matrix W and H to root of the average of V, perturbed with uniform noise.
More...
#include <average_init.hpp>
|
template<typename Archive > |
void | serialize (Archive &, const uint32_t) |
| Serialize the object (in this case, there is nothing to do).
|
|
|
template<typename MatType > |
static void | Initialize (const MatType &V, const size_t r, arma::mat &W, arma::mat &H) |
| Initialize the matrices W and H to the average value of V with uniform random noise added. More...
|
|
template<typename MatType > |
static void | InitializeOne (const MatType &V, const size_t r, arma::mat &M, const bool whichMatrix=true) |
| Initialize the matrix W or H to the average value of V with uniform random noise added. More...
|
|
This initialization rule initializes matrix W and H to root of the average of V, perturbed with uniform noise.
Uniform noise is generated by Armadillo's 'randu' function. For better performance, the lowest element of the matrix is subtracted from the average before dividing it by the factorization rank. This computed value is added with the random noise.
◆ Initialize()
template<typename MatType >
static void mlpack::amf::AverageInitialization::Initialize |
( |
const MatType & |
V, |
|
|
const size_t |
r, |
|
|
arma::mat & |
W, |
|
|
arma::mat & |
H |
|
) |
| |
|
inlinestatic |
Initialize the matrices W and H to the average value of V with uniform random noise added.
- Parameters
-
V | Input matrix. |
r | Rank of matrix. |
W | W matrix, to be initialized. |
H | H matrix, to be initialized. |
◆ InitializeOne()
template<typename MatType >
static void mlpack::amf::AverageInitialization::InitializeOne |
( |
const MatType & |
V, |
|
|
const size_t |
r, |
|
|
arma::mat & |
M, |
|
|
const bool |
whichMatrix = true |
|
) |
| |
|
inlinestatic |
Initialize the matrix W or H to the average value of V with uniform random noise added.
- Parameters
-
V | Input matrix. |
r | Rank of matrix. |
M | W or H matrix, to be initialized to the average value of V with uniform random noise added. |
whichMatrix | If true, initialize W. Otherwise, initialize H. |
The documentation for this class was generated from the following file: