mlpack
master
|
This class computes SVD using complete incremental batch learning, as described in the following paper: More...
Public Member Functions | |
SVDCompleteIncrementalLearning (double u=0.0001, double kw=0, double kh=0) | |
Initialize the SVDCompleteIncrementalLearning class with the given parameters. More... | |
void | HUpdate (const MatType &V, const arma::mat &W, arma::mat &H) |
The update rule for the encoding matrix H. More... | |
void | Initialize (const MatType &, const size_t) |
Initialize parameters before factorization. More... | |
void | WUpdate (const MatType &V, arma::mat &W, const arma::mat &H) |
The update rule for the basis matrix W. More... | |
Private Attributes | |
size_t | currentItemIndex |
Item index of current entry. More... | |
size_t | currentUserIndex |
User of index of current entry. More... | |
double | kh |
Regularization parameter for matrix H. More... | |
double | kw |
Regularization parameter for matrix W. More... | |
double | u |
Step count of batch learning. More... | |
This class computes SVD using complete incremental batch learning, as described in the following paper:
This class implements 'Algorithm 3' given in the paper. Complete incremental learning is an extreme case of incremental learning, where feature vectors are updated after looking at each single element in the input matrix (V). This approach differs from incomplete incremental learning where feature vectors are updated after seeing columns of elements in the input matrix.
Definition at line 45 of file svd_complete_incremental_learning.hpp.
|
inline |
Initialize the SVDCompleteIncrementalLearning class with the given parameters.
u | Step value used in batch learning. |
kw | Regularization constant for W matrix. |
kh | Regularization constant for H matrix. |
Definition at line 56 of file svd_complete_incremental_learning.hpp.
|
inline |
The update rule for the encoding matrix H.
The function takes in all the matrices and only changes the value of the H matrix.
V | Input matrix to be factorized. |
W | Basis matrix. |
H | Encoding matrix to be updated. |
Definition at line 123 of file svd_complete_incremental_learning.hpp.
References mlpack::amf::SVDCompleteIncrementalLearning< MatType >::currentItemIndex, mlpack::amf::SVDCompleteIncrementalLearning< MatType >::currentUserIndex, mlpack::amf::SVDCompleteIncrementalLearning< MatType >::kh, and mlpack::amf::SVDCompleteIncrementalLearning< MatType >::u.
|
inline |
Initialize parameters before factorization.
This function must be called before a new factorization. For this initialization, the input parameters are unnecessary; we are only setting the current element index to 0.
dataset | Input matrix to be factorized. |
rank | rank of factorization |
Definition at line 72 of file svd_complete_incremental_learning.hpp.
References mlpack::amf::SVDCompleteIncrementalLearning< MatType >::currentItemIndex, and mlpack::amf::SVDCompleteIncrementalLearning< MatType >::currentUserIndex.
|
inline |
The update rule for the basis matrix W.
The function takes in all the matrices and only changes the value of the W matrix.
V | Input matrix to be factorized. |
W | Basis matrix to be updated. |
H | Encoding matrix. |
Definition at line 87 of file svd_complete_incremental_learning.hpp.
References mlpack::amf::SVDCompleteIncrementalLearning< MatType >::currentItemIndex, mlpack::amf::SVDCompleteIncrementalLearning< MatType >::currentUserIndex, mlpack::amf::SVDCompleteIncrementalLearning< MatType >::kw, and mlpack::amf::SVDCompleteIncrementalLearning< MatType >::u.
|
private |
Item index of current entry.
Definition at line 161 of file svd_complete_incremental_learning.hpp.
Referenced by mlpack::amf::SVDCompleteIncrementalLearning< MatType >::HUpdate(), mlpack::amf::SVDCompleteIncrementalLearning< arma::sp_mat >::HUpdate(), mlpack::amf::SVDCompleteIncrementalLearning< MatType >::Initialize(), mlpack::amf::SVDCompleteIncrementalLearning< MatType >::WUpdate(), and mlpack::amf::SVDCompleteIncrementalLearning< arma::sp_mat >::WUpdate().
|
private |
User of index of current entry.
Definition at line 159 of file svd_complete_incremental_learning.hpp.
Referenced by mlpack::amf::SVDCompleteIncrementalLearning< MatType >::HUpdate(), mlpack::amf::SVDCompleteIncrementalLearning< arma::sp_mat >::HUpdate(), mlpack::amf::SVDCompleteIncrementalLearning< MatType >::Initialize(), mlpack::amf::SVDCompleteIncrementalLearning< MatType >::WUpdate(), and mlpack::amf::SVDCompleteIncrementalLearning< arma::sp_mat >::WUpdate().
|
private |
Regularization parameter for matrix H.
Definition at line 156 of file svd_complete_incremental_learning.hpp.
Referenced by mlpack::amf::SVDCompleteIncrementalLearning< MatType >::HUpdate(), and mlpack::amf::SVDCompleteIncrementalLearning< arma::sp_mat >::HUpdate().
|
private |
Regularization parameter for matrix W.
Definition at line 154 of file svd_complete_incremental_learning.hpp.
Referenced by mlpack::amf::SVDCompleteIncrementalLearning< MatType >::WUpdate(), and mlpack::amf::SVDCompleteIncrementalLearning< arma::sp_mat >::WUpdate().
|
private |
Step count of batch learning.
Definition at line 152 of file svd_complete_incremental_learning.hpp.
Referenced by mlpack::amf::SVDCompleteIncrementalLearning< MatType >::HUpdate(), mlpack::amf::SVDCompleteIncrementalLearning< arma::sp_mat >::HUpdate(), mlpack::amf::SVDCompleteIncrementalLearning< MatType >::WUpdate(), and mlpack::amf::SVDCompleteIncrementalLearning< arma::sp_mat >::WUpdate().