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;
154 template<
typename MatType = arma::mat>
156 amf::SimpleResidueTermination,
157 amf::RandomAcolInitialization<>,
168 template<
class MatType = arma::mat>
170 amf::SimpleResidueTermination,
171 amf::RandomAcolInitialization<>,
181 template<
class MatType = arma::mat>
183 amf::SimpleResidueTermination,
184 amf::RandomAcolInitialization<>,
190 #include "amf_impl.hpp" 192 #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...
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...
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
amf::AMF< amf::SimpleResidueTermination, amf::RandomAcolInitialization<>, amf::NMFALSUpdate > NMFALSFactorizer
This class implements a simple residue-based termination policy.
const UpdateRuleType & Update() const
Access the update rule.
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.
const TerminationPolicyType & TerminationPolicy() const
Access the termination policy.
InitializationRuleType & InitializeRule()
Modify the initialization rule.
This class initializes the W matrix of the AMF algorithm by averaging p randomly chosen columns of V...
const InitializationRuleType & InitializeRule() const
Access the initialization rule.
TerminationPolicyType & TerminationPolicy()
Modify the termination policy.
The multiplicative distance update rules for matrices W and H.