\section{mlpack\+:\+:amf Namespace Reference}
\label{namespacemlpack_1_1amf}\index{mlpack\+::amf@{mlpack\+::amf}}


Alternating Matrix Factorization.  


\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \textbf{ A\+MF}
\begin{DoxyCompactList}\small\item\em This class implements \doxyref{A\+MF}{p.}{classmlpack_1_1amf_1_1AMF} (alternating matrix factorization) on the given matrix V. \end{DoxyCompactList}\item 
class \textbf{ Average\+Initialization}
\begin{DoxyCompactList}\small\item\em This initialization rule initializes matrix W and H to root of the average of V, perturbed with uniform noise. \end{DoxyCompactList}\item 
class \textbf{ Complete\+Incremental\+Termination}
\begin{DoxyCompactList}\small\item\em This class acts as a wrapper for basic termination policies to be used by \doxyref{S\+V\+D\+Complete\+Incremental\+Learning}{p.}{classmlpack_1_1amf_1_1SVDCompleteIncrementalLearning}. \end{DoxyCompactList}\item 
class \textbf{ Given\+Initialization}
\begin{DoxyCompactList}\small\item\em This initialization rule for \doxyref{A\+MF}{p.}{classmlpack_1_1amf_1_1AMF} simply fills the W and H matrices with the matrices given to the constructor of this object. \end{DoxyCompactList}\item 
class \textbf{ Incomplete\+Incremental\+Termination}
\begin{DoxyCompactList}\small\item\em This class acts as a wrapper for basic termination policies to be used by \doxyref{S\+V\+D\+Incomplete\+Incremental\+Learning}{p.}{classmlpack_1_1amf_1_1SVDIncompleteIncrementalLearning}. \end{DoxyCompactList}\item 
class \textbf{ Max\+Iteration\+Termination}
\begin{DoxyCompactList}\small\item\em This termination policy only terminates when the maximum number of iterations has been reached. \end{DoxyCompactList}\item 
class \textbf{ Merge\+Initialization}
\begin{DoxyCompactList}\small\item\em This initialization rule for \doxyref{A\+MF}{p.}{classmlpack_1_1amf_1_1AMF} simply takes in two initialization rules, and initialize W with the first rule and H with the second rule. \end{DoxyCompactList}\item 
class \textbf{ N\+M\+F\+A\+L\+S\+Update}
\begin{DoxyCompactList}\small\item\em This class implements a method titled \textquotesingle{}Alternating Least Squares\textquotesingle{} described in the following paper\+: \end{DoxyCompactList}\item 
class \textbf{ N\+M\+F\+Multiplicative\+Distance\+Update}
\begin{DoxyCompactList}\small\item\em The multiplicative distance update rules for matrices W and H. \end{DoxyCompactList}\item 
class \textbf{ N\+M\+F\+Multiplicative\+Divergence\+Update}
\begin{DoxyCompactList}\small\item\em This follows a method described in the paper \textquotesingle{}Algorithms for Non-\/negative. \end{DoxyCompactList}\item 
class \textbf{ Random\+Acol\+Initialization}
\begin{DoxyCompactList}\small\item\em This class initializes the W matrix of the \doxyref{A\+MF}{p.}{classmlpack_1_1amf_1_1AMF} algorithm by averaging p randomly chosen columns of V. \end{DoxyCompactList}\item 
class \textbf{ Random\+Initialization}
\begin{DoxyCompactList}\small\item\em This initialization rule for \doxyref{A\+MF}{p.}{classmlpack_1_1amf_1_1AMF} simply fills the W and H matrices with uniform random noise in [0, 1]. \end{DoxyCompactList}\item 
class \textbf{ Simple\+Residue\+Termination}
\begin{DoxyCompactList}\small\item\em This class implements a simple residue-\/based termination policy. \end{DoxyCompactList}\item 
class \textbf{ Simple\+Tolerance\+Termination}
\begin{DoxyCompactList}\small\item\em This class implements residue tolerance termination policy. \end{DoxyCompactList}\item 
class \textbf{ S\+V\+D\+Batch\+Learning}
\begin{DoxyCompactList}\small\item\em This class implements S\+VD batch learning with momentum. \end{DoxyCompactList}\item 
class \textbf{ S\+V\+D\+Complete\+Incremental\+Learning}
\begin{DoxyCompactList}\small\item\em This class computes S\+VD using complete incremental batch learning, as described in the following paper\+: \end{DoxyCompactList}\item 
class \textbf{ S\+V\+D\+Complete\+Incremental\+Learning$<$ arma\+::sp\+\_\+mat $>$}
\begin{DoxyCompactList}\small\item\em T\+O\+DO \+: Merge this template specialized function for sparse matrix using common row\+\_\+col\+\_\+iterator. \end{DoxyCompactList}\item 
class \textbf{ S\+V\+D\+Incomplete\+Incremental\+Learning}
\begin{DoxyCompactList}\small\item\em This class computes S\+VD using incomplete incremental batch learning, as described in the following paper\+: \end{DoxyCompactList}\item 
class \textbf{ Validation\+R\+M\+S\+E\+Termination}
\begin{DoxyCompactList}\small\item\em This class implements validation termination policy based on R\+M\+SE index. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef \textbf{ amf\+::\+A\+MF}$<$ \textbf{ amf\+::\+Simple\+Residue\+Termination}, \textbf{ amf\+::\+Random\+Acol\+Initialization}$<$$>$, \textbf{ amf\+::\+N\+M\+F\+A\+L\+S\+Update} $>$ \textbf{ N\+M\+F\+A\+L\+S\+Factorizer}
\item 
{\footnotesize template$<$typename Mat\+Type  = arma\+::mat$>$ }\\using \textbf{ S\+V\+D\+Batch\+Factorizer} = \textbf{ amf\+::\+A\+MF}$<$ \textbf{ amf\+::\+Simple\+Residue\+Termination}, \textbf{ amf\+::\+Random\+Acol\+Initialization}$<$$>$, \textbf{ amf\+::\+S\+V\+D\+Batch\+Learning} $>$
\begin{DoxyCompactList}\small\item\em Convenience typedefs. \end{DoxyCompactList}\item 
{\footnotesize template$<$class Mat\+Type  = arma\+::mat$>$ }\\using \textbf{ S\+V\+D\+Complete\+Incremental\+Factorizer} = \textbf{ amf\+::\+A\+MF}$<$ \textbf{ amf\+::\+Simple\+Residue\+Termination}, \textbf{ amf\+::\+Random\+Acol\+Initialization}$<$$>$, \textbf{ amf\+::\+S\+V\+D\+Complete\+Incremental\+Learning}$<$ Mat\+Type $>$ $>$
\begin{DoxyCompactList}\small\item\em S\+V\+D\+Complete\+Incremental\+Factorizer factorizes given matrix V into two matrices W and H by complete incremental gradient descent. \end{DoxyCompactList}\item 
{\footnotesize template$<$class Mat\+Type  = arma\+::mat$>$ }\\using \textbf{ S\+V\+D\+Incomplete\+Incremental\+Factorizer} = \textbf{ amf\+::\+A\+MF}$<$ \textbf{ amf\+::\+Simple\+Residue\+Termination}, \textbf{ amf\+::\+Random\+Acol\+Initialization}$<$$>$, \textbf{ amf\+::\+S\+V\+D\+Incomplete\+Incremental\+Learning} $>$
\begin{DoxyCompactList}\small\item\em S\+V\+D\+Incomplete\+Incremental\+Factorizer factorizes given matrix V into two matrices W and H by incomplete incremental gradient descent. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$$>$ }\\void \textbf{ S\+V\+D\+Batch\+Learning\+::\+H\+Update$<$ arma\+::sp\+\_\+mat $>$} (const arma\+::sp\+\_\+mat \&V, const arma\+::mat \&W, arma\+::mat \&H)
\item 
{\footnotesize template$<$$>$ }\\void \textbf{ S\+V\+D\+Batch\+Learning\+::\+W\+Update$<$ arma\+::sp\+\_\+mat $>$} (const arma\+::sp\+\_\+mat \&V, arma\+::mat \&W, const arma\+::mat \&H)
\begin{DoxyCompactList}\small\item\em T\+O\+DO \+: Merge this template specialized function for sparse matrix using common row\+\_\+col\+\_\+iterator. \end{DoxyCompactList}\item 
{\footnotesize template$<$$>$ }\\void \textbf{ S\+V\+D\+Incomplete\+Incremental\+Learning\+::\+H\+Update$<$ arma\+::sp\+\_\+mat $>$} (const arma\+::sp\+\_\+mat \&V, const arma\+::mat \&W, arma\+::mat \&H)
\item 
{\footnotesize template$<$$>$ }\\void \textbf{ S\+V\+D\+Incomplete\+Incremental\+Learning\+::\+W\+Update$<$ arma\+::sp\+\_\+mat $>$} (const arma\+::sp\+\_\+mat \&V, arma\+::mat \&W, const arma\+::mat \&H)
\begin{DoxyCompactList}\small\item\em T\+O\+DO \+: Merge this template specialized function for sparse matrix using common row\+\_\+col\+\_\+iterator. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Alternating Matrix Factorization. 

\subsection{Typedef Documentation}
\mbox{\label{namespacemlpack_1_1amf_a3e3179901b352438bc974218b6ba0fab}} 
\index{mlpack\+::amf@{mlpack\+::amf}!N\+M\+F\+A\+L\+S\+Factorizer@{N\+M\+F\+A\+L\+S\+Factorizer}}
\index{N\+M\+F\+A\+L\+S\+Factorizer@{N\+M\+F\+A\+L\+S\+Factorizer}!mlpack\+::amf@{mlpack\+::amf}}
\subsubsection{N\+M\+F\+A\+L\+S\+Factorizer}
{\footnotesize\ttfamily typedef \textbf{ amf\+::\+A\+MF}$<$\textbf{ amf\+::\+Simple\+Residue\+Termination}, \textbf{ amf\+::\+Random\+Acol\+Initialization}$<$$>$, \textbf{ amf\+::\+N\+M\+F\+A\+L\+S\+Update}$>$ \textbf{ N\+M\+F\+A\+L\+S\+Factorizer}}



Definition at line 143 of file amf.\+hpp.

\mbox{\label{namespacemlpack_1_1amf_aedb113157f87759c24e2368dfd7b9216}} 
\index{mlpack\+::amf@{mlpack\+::amf}!S\+V\+D\+Batch\+Factorizer@{S\+V\+D\+Batch\+Factorizer}}
\index{S\+V\+D\+Batch\+Factorizer@{S\+V\+D\+Batch\+Factorizer}!mlpack\+::amf@{mlpack\+::amf}}
\subsubsection{S\+V\+D\+Batch\+Factorizer}
{\footnotesize\ttfamily using \textbf{ S\+V\+D\+Batch\+Factorizer} =  \textbf{ amf\+::\+A\+MF}$<$ \textbf{ amf\+::\+Simple\+Residue\+Termination}, \textbf{ amf\+::\+Random\+Acol\+Initialization}$<$$>$, \textbf{ amf\+::\+S\+V\+D\+Batch\+Learning}$>$}



Convenience typedefs. 

S\+V\+D\+Batch\+Factorizer factorizes given matrix V into two matrices W and H by gradient descent. S\+VD batch learning is described in paper \textquotesingle{}A Guide to singular Value Decomposition\textquotesingle{} by Chih-\/\+Chao Ma.

\begin{DoxySeeAlso}{See also}
\doxyref{S\+V\+D\+Batch\+Learning}{p.}{classmlpack_1_1amf_1_1SVDBatchLearning} 
\end{DoxySeeAlso}


Definition at line 158 of file amf.\+hpp.

\mbox{\label{namespacemlpack_1_1amf_aeaa4b749fc1afc70451f096dca4228b5}} 
\index{mlpack\+::amf@{mlpack\+::amf}!S\+V\+D\+Complete\+Incremental\+Factorizer@{S\+V\+D\+Complete\+Incremental\+Factorizer}}
\index{S\+V\+D\+Complete\+Incremental\+Factorizer@{S\+V\+D\+Complete\+Incremental\+Factorizer}!mlpack\+::amf@{mlpack\+::amf}}
\subsubsection{S\+V\+D\+Complete\+Incremental\+Factorizer}
{\footnotesize\ttfamily using \textbf{ S\+V\+D\+Complete\+Incremental\+Factorizer} =  \textbf{ amf\+::\+A\+MF}$<$ \textbf{ amf\+::\+Simple\+Residue\+Termination}, \textbf{ amf\+::\+Random\+Acol\+Initialization}$<$$>$, \textbf{ amf\+::\+S\+V\+D\+Complete\+Incremental\+Learning}$<$Mat\+Type$>$ $>$}



S\+V\+D\+Complete\+Incremental\+Factorizer factorizes given matrix V into two matrices W and H by complete incremental gradient descent. 

S\+VD complete incremental learning is described in paper \textquotesingle{}A Guide to singular Value Decomposition\textquotesingle{} by Chih-\/\+Chao Ma.

\begin{DoxySeeAlso}{See also}
\doxyref{S\+V\+D\+Complete\+Incremental\+Learning}{p.}{classmlpack_1_1amf_1_1SVDCompleteIncrementalLearning} 
\end{DoxySeeAlso}


Definition at line 185 of file amf.\+hpp.

\mbox{\label{namespacemlpack_1_1amf_a681ac877cb603d00766e015ff4d4c294}} 
\index{mlpack\+::amf@{mlpack\+::amf}!S\+V\+D\+Incomplete\+Incremental\+Factorizer@{S\+V\+D\+Incomplete\+Incremental\+Factorizer}}
\index{S\+V\+D\+Incomplete\+Incremental\+Factorizer@{S\+V\+D\+Incomplete\+Incremental\+Factorizer}!mlpack\+::amf@{mlpack\+::amf}}
\subsubsection{S\+V\+D\+Incomplete\+Incremental\+Factorizer}
{\footnotesize\ttfamily using \textbf{ S\+V\+D\+Incomplete\+Incremental\+Factorizer} =  \textbf{ amf\+::\+A\+MF}$<$ \textbf{ amf\+::\+Simple\+Residue\+Termination}, \textbf{ amf\+::\+Random\+Acol\+Initialization}$<$$>$, \textbf{ amf\+::\+S\+V\+D\+Incomplete\+Incremental\+Learning}$>$}



S\+V\+D\+Incomplete\+Incremental\+Factorizer factorizes given matrix V into two matrices W and H by incomplete incremental gradient descent. 

S\+VD incomplete incremental learning is described in paper \textquotesingle{}A Guide to singular Value Decomposition\textquotesingle{} by Chih-\/\+Chao Ma.

\begin{DoxySeeAlso}{See also}
\doxyref{S\+V\+D\+Incomplete\+Incremental\+Learning}{p.}{classmlpack_1_1amf_1_1SVDIncompleteIncrementalLearning} 
\end{DoxySeeAlso}


Definition at line 172 of file amf.\+hpp.



\subsection{Function Documentation}
\mbox{\label{namespacemlpack_1_1amf_aff87130b0b4854026fdb315627b93916}} 
\index{mlpack\+::amf@{mlpack\+::amf}!S\+V\+D\+Batch\+Learning\+::\+H\+Update$<$ arma\+::sp\+\_\+mat $>$@{S\+V\+D\+Batch\+Learning\+::\+H\+Update$<$ arma\+::sp\+\_\+mat $>$}}
\index{S\+V\+D\+Batch\+Learning\+::\+H\+Update$<$ arma\+::sp\+\_\+mat $>$@{S\+V\+D\+Batch\+Learning\+::\+H\+Update$<$ arma\+::sp\+\_\+mat $>$}!mlpack\+::amf@{mlpack\+::amf}}
\subsubsection{S\+V\+D\+Batch\+Learning\+::\+H\+Update$<$ arma\+::sp\+\_\+mat $>$()}
{\footnotesize\ttfamily void \textbf{ mlpack\+::amf\+::\+S\+V\+D\+Batch\+Learning\+::\+H\+Update}$<$ arma\+::sp\+\_\+mat $>$ (\begin{DoxyParamCaption}\item[{const arma\+::sp\+\_\+mat \&}]{V,  }\item[{const arma\+::mat \&}]{W,  }\item[{arma\+::mat \&}]{H }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Definition at line 230 of file svd\+\_\+batch\+\_\+learning.\+hpp.

\mbox{\label{namespacemlpack_1_1amf_afe7f98a0fec98543b68a87ed1f044af0}} 
\index{mlpack\+::amf@{mlpack\+::amf}!S\+V\+D\+Batch\+Learning\+::\+W\+Update$<$ arma\+::sp\+\_\+mat $>$@{S\+V\+D\+Batch\+Learning\+::\+W\+Update$<$ arma\+::sp\+\_\+mat $>$}}
\index{S\+V\+D\+Batch\+Learning\+::\+W\+Update$<$ arma\+::sp\+\_\+mat $>$@{S\+V\+D\+Batch\+Learning\+::\+W\+Update$<$ arma\+::sp\+\_\+mat $>$}!mlpack\+::amf@{mlpack\+::amf}}
\subsubsection{S\+V\+D\+Batch\+Learning\+::\+W\+Update$<$ arma\+::sp\+\_\+mat $>$()}
{\footnotesize\ttfamily void \textbf{ mlpack\+::amf\+::\+S\+V\+D\+Batch\+Learning\+::\+W\+Update}$<$ arma\+::sp\+\_\+mat $>$ (\begin{DoxyParamCaption}\item[{const arma\+::sp\+\_\+mat \&}]{V,  }\item[{arma\+::mat \&}]{W,  }\item[{const arma\+::mat \&}]{H }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



T\+O\+DO \+: Merge this template specialized function for sparse matrix using common row\+\_\+col\+\_\+iterator. 

W\+Update function specialization for sparse matrix 

Definition at line 202 of file svd\+\_\+batch\+\_\+learning.\+hpp.

\mbox{\label{namespacemlpack_1_1amf_a1e85a4f6a4f543e56b2f8b1587cd2dd6}} 
\index{mlpack\+::amf@{mlpack\+::amf}!S\+V\+D\+Incomplete\+Incremental\+Learning\+::\+H\+Update$<$ arma\+::sp\+\_\+mat $>$@{S\+V\+D\+Incomplete\+Incremental\+Learning\+::\+H\+Update$<$ arma\+::sp\+\_\+mat $>$}}
\index{S\+V\+D\+Incomplete\+Incremental\+Learning\+::\+H\+Update$<$ arma\+::sp\+\_\+mat $>$@{S\+V\+D\+Incomplete\+Incremental\+Learning\+::\+H\+Update$<$ arma\+::sp\+\_\+mat $>$}!mlpack\+::amf@{mlpack\+::amf}}
\subsubsection{S\+V\+D\+Incomplete\+Incremental\+Learning\+::\+H\+Update$<$ arma\+::sp\+\_\+mat $>$()}
{\footnotesize\ttfamily void \textbf{ mlpack\+::amf\+::\+S\+V\+D\+Incomplete\+Incremental\+Learning\+::\+H\+Update}$<$ arma\+::sp\+\_\+mat $>$ (\begin{DoxyParamCaption}\item[{const arma\+::sp\+\_\+mat \&}]{V,  }\item[{const arma\+::mat \&}]{W,  }\item[{arma\+::mat \&}]{H }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Definition at line 185 of file svd\+\_\+incomplete\+\_\+incremental\+\_\+learning.\+hpp.

\mbox{\label{namespacemlpack_1_1amf_acbc9573bcb3df2b5dd1d20cd7a1e4c85}} 
\index{mlpack\+::amf@{mlpack\+::amf}!S\+V\+D\+Incomplete\+Incremental\+Learning\+::\+W\+Update$<$ arma\+::sp\+\_\+mat $>$@{S\+V\+D\+Incomplete\+Incremental\+Learning\+::\+W\+Update$<$ arma\+::sp\+\_\+mat $>$}}
\index{S\+V\+D\+Incomplete\+Incremental\+Learning\+::\+W\+Update$<$ arma\+::sp\+\_\+mat $>$@{S\+V\+D\+Incomplete\+Incremental\+Learning\+::\+W\+Update$<$ arma\+::sp\+\_\+mat $>$}!mlpack\+::amf@{mlpack\+::amf}}
\subsubsection{S\+V\+D\+Incomplete\+Incremental\+Learning\+::\+W\+Update$<$ arma\+::sp\+\_\+mat $>$()}
{\footnotesize\ttfamily void \textbf{ mlpack\+::amf\+::\+S\+V\+D\+Incomplete\+Incremental\+Learning\+::\+W\+Update}$<$ arma\+::sp\+\_\+mat $>$ (\begin{DoxyParamCaption}\item[{const arma\+::sp\+\_\+mat \&}]{V,  }\item[{arma\+::mat \&}]{W,  }\item[{const arma\+::mat \&}]{H }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



T\+O\+DO \+: Merge this template specialized function for sparse matrix using common row\+\_\+col\+\_\+iterator. 

template specialiazed functions for sparse matrices 

Definition at line 166 of file svd\+\_\+incomplete\+\_\+incremental\+\_\+learning.\+hpp.

