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>
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;
154template<
typename MatType = arma::mat>
168template<
class MatType = arma::mat>
181template<
class MatType = arma::mat>
190#include "amf_impl.hpp"
This class implements AMF (alternating matrix factorization) on the given matrix V.
const TerminationPolicyType & TerminationPolicy() const
Access the termination policy.
UpdateRuleType & Update()
Modify the update rule.
TerminationPolicyType & TerminationPolicy()
Modify the termination policy.
double Apply(const MatType &V, const size_t r, arma::mat &W, arma::mat &H)
Apply Alternating Matrix Factorization to the provided matrix.
const UpdateRuleType & Update() const
Access the update rule.
InitializationRuleType & InitializeRule()
Modify the initialization rule.
const InitializationRuleType & InitializeRule() const
Access the initialization rule.
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.
This class implements a method titled 'Alternating Least Squares' described in the following paper:
The multiplicative distance update rules for matrices W and H.
This class initializes the W matrix of the AMF algorithm by averaging p randomly chosen columns of V.
This class implements SVD batch learning with momentum.
This class computes SVD using complete incremental batch learning, as described in the following pape...
This class computes SVD using incomplete incremental batch learning, as described in the following pa...
This class implements a simple residue-based termination policy.
amf::AMF< amf::SimpleResidueTermination, amf::RandomAcolInitialization<>, amf::NMFALSUpdate > NMFALSFactorizer
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.