18 #ifndef MLPACK_METHODS_AMF_AMF_HPP
19 #define MLPACK_METHODS_AMF_AMF_HPP
97 AMF(
const TerminationPolicyType& terminationPolicy = TerminationPolicyType(),
98 const InitializationRuleType& initializeRule = InitializationRuleType(),
99 const UpdateRuleType& update = UpdateRuleType());
109 template<
typename MatType>
110 double Apply(
const MatType& V,
117 {
return terminationPolicy; }
123 {
return initializationRule; }
128 const UpdateRuleType&
Update()
const {
return update; }
130 UpdateRuleType&
Update() {
return update; }
134 TerminationPolicyType terminationPolicy;
136 InitializationRuleType initializationRule;
138 UpdateRuleType update;
146 #ifdef MLPACK_USE_CXX11
155 template<
class MatType>
169 template<
class MatType>
182 template<
class MatType>
188 #else // #ifdef MLPACK_USE_CXX11
263 #endif // #ifdef MLPACK_USE_CXX11
269 #include "amf_impl.hpp"
271 #endif // MLPACK_METHODS_AMF_AMF_HPP
UpdateRuleType & Update()
Modify the update rule.
This class computes SVD using complete incremental batch learning, as described in the following pape...
const TerminationPolicyType & TerminationPolicy() const
Access the termination policy.
This class implements AMF (alternating matrix factorization) on the given matrix V.
This class computes SVD using incomplete incremental batch learning, as described in the following pa...
TODO : Merge this template specialized function for sparse matrix using common row_col_iterator.
amf::AMF< amf::SimpleResidueTermination, amf::RandomAcolInitialization<>, amf::SVDIncompleteIncrementalLearning > SparseSVDIncompleteIncrementalFactorizer
SparseSVDIncompleteIncrementalFactorizer factorizes given sparse matrix V into two matrices W and H b...
The core includes that mlpack expects; standard C++ includes and Armadillo.
amf::AMF< amf::SimpleResidueTermination, amf::RandomAcolInitialization<>, amf::NMFALSUpdate > NMFALSFactorizer
amf::AMF< amf::SimpleResidueTermination, amf::RandomAcolInitialization<>, amf::SVDBatchLearning > SparseSVDBatchFactorizer
Add simple typedefs.
This class implements a simple residue-based termination policy.
const UpdateRuleType & Update() const
Access the update rule.
const InitializationRuleType & InitializeRule() const
Access the initialization rule.
amf::AMF< amf::SimpleResidueTermination, amf::RandomAcolInitialization<>, amf::SVDBatchLearning > SVDBatchFactorizer
SparseSVDBatchFactorizer factorizes given matrix V into two matrices W and H by gradient descent...
This class implements SVD batch learning with momentum.
This class implements a method titled 'Alternating Least Squares' described in the following paper: ...
double Apply(const MatType &V, const size_t r, arma::mat &W, arma::mat &H)
Apply Alternating Matrix Factorization to the provided matrix.
AMF(const TerminationPolicyType &terminationPolicy=TerminationPolicyType(), const InitializationRuleType &initializeRule=InitializationRuleType(), const UpdateRuleType &update=UpdateRuleType())
Create the AMF object and (optionally) set the parameters which AMF will run with.
amf::AMF< amf::SimpleResidueTermination, amf::RandomAcolInitialization<>, amf::SVDCompleteIncrementalLearning< arma::mat > > SVDCompleteIncrementalFactorizer
SVDCompleteIncrementalFactorizer factorizes given matrix V into two matrices W and H by complete incr...
InitializationRuleType & InitializeRule()
Modify the initialization rule.
This class initializes the W matrix of the AMF algorithm by averaging p randomly chosen columns of V...
amf::AMF< amf::SimpleResidueTermination, amf::RandomAcolInitialization<>, amf::SVDIncompleteIncrementalLearning > SVDIncompleteIncrementalFactorizer
SVDIncompleteIncrementalFactorizer factorizes given matrix V into two matrices W and H by incomplete ...
amf::AMF< amf::SimpleResidueTermination, amf::RandomAcolInitialization<>, amf::SVDCompleteIncrementalLearning< arma::sp_mat > > SparseSVDCompleteIncrementalFactorizer
SparseSVDCompleteIncrementalFactorizer factorizes given sparse matrix V into two matrices W and H by ...
TerminationPolicyType & TerminationPolicy()
Modify the termination policy.
The multiplicative distance update rules for matrices W and H.