\section{Random\+Acol\+Initialization$<$ columns\+To\+Average $>$ Class Template Reference}
\label{classmlpack_1_1amf_1_1RandomAcolInitialization}\index{Random\+Acol\+Initialization$<$ columns\+To\+Average $>$@{Random\+Acol\+Initialization$<$ columns\+To\+Average $>$}}


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.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Random\+Acol\+Initialization} ()
\item 
{\footnotesize template$<$typename Archive $>$ }\\void \textbf{ serialize} (Archive \&, const unsigned int)
\begin{DoxyCompactList}\small\item\em Serialize the object (in this case, there is nothing to serialize). \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename Mat\+Type $>$ }\\static void \textbf{ Initialize} (const Mat\+Type \&V, const size\+\_\+t r, arma\+::mat \&W, arma\+::mat \&H)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$size\+\_\+t columns\+To\+Average = 5$>$\newline
class mlpack\+::amf\+::\+Random\+Acol\+Initialization$<$ columns\+To\+Average $>$}

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. 

In this case, p is a template parameter. H is then filled using a uniform distribution in the range [0, 1].

This simple initialization is the \char`\"{}random Acol initialization\char`\"{} found in the following paper\+:


\begin{DoxyCode}
@techreport\{langville2014algorithms,
  title = \{Algorithms, Initializations, and Convergence \textcolor{keywordflow}{for} the Nonnegative
      Matrix Factorization\},
  author = \{Langville, A.N. and Meyer, C.D. and Albright, R. and Cox, J. and
      Duling, D.\},
  year = \{2014\},
  institution = \{NCSU Technical Report Math 81706\}
\}
\end{DoxyCode}



\begin{DoxyTemplParams}{Template Parameters}
{\em columns\+To\+Average} & The number of random columns to average for each column of W. \\
\hline
\end{DoxyTemplParams}


Definition at line 44 of file random\+\_\+acol\+\_\+init.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\label{classmlpack_1_1amf_1_1RandomAcolInitialization_ae167200b856b43c6d791f40eec362d21}} 
\index{mlpack\+::amf\+::\+Random\+Acol\+Initialization@{mlpack\+::amf\+::\+Random\+Acol\+Initialization}!Random\+Acol\+Initialization@{Random\+Acol\+Initialization}}
\index{Random\+Acol\+Initialization@{Random\+Acol\+Initialization}!mlpack\+::amf\+::\+Random\+Acol\+Initialization@{mlpack\+::amf\+::\+Random\+Acol\+Initialization}}
\subsubsection{Random\+Acol\+Initialization()}
{\footnotesize\ttfamily \textbf{ Random\+Acol\+Initialization} (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Definition at line 48 of file random\+\_\+acol\+\_\+init.\+hpp.



\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1amf_1_1RandomAcolInitialization_a02a3610958f42b7dbef8bd5063ceaee7}} 
\index{mlpack\+::amf\+::\+Random\+Acol\+Initialization@{mlpack\+::amf\+::\+Random\+Acol\+Initialization}!Initialize@{Initialize}}
\index{Initialize@{Initialize}!mlpack\+::amf\+::\+Random\+Acol\+Initialization@{mlpack\+::amf\+::\+Random\+Acol\+Initialization}}
\subsubsection{Initialize()}
{\footnotesize\ttfamily static void Initialize (\begin{DoxyParamCaption}\item[{const Mat\+Type \&}]{V,  }\item[{const size\+\_\+t}]{r,  }\item[{arma\+::mat \&}]{W,  }\item[{arma\+::mat \&}]{H }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Definition at line 52 of file random\+\_\+acol\+\_\+init.\+hpp.



References mlpack\+::math\+::\+Rand\+Int(), and Log\+::\+Warn.

\mbox{\label{classmlpack_1_1amf_1_1RandomAcolInitialization_aa5b3dd8336182f751ebec27167c22415}} 
\index{mlpack\+::amf\+::\+Random\+Acol\+Initialization@{mlpack\+::amf\+::\+Random\+Acol\+Initialization}!serialize@{serialize}}
\index{serialize@{serialize}!mlpack\+::amf\+::\+Random\+Acol\+Initialization@{mlpack\+::amf\+::\+Random\+Acol\+Initialization}}
\subsubsection{serialize()}
{\footnotesize\ttfamily void serialize (\begin{DoxyParamCaption}\item[{Archive \&}]{,  }\item[{const unsigned}]{int }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Serialize the object (in this case, there is nothing to serialize). 



Definition at line 88 of file random\+\_\+acol\+\_\+init.\+hpp.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
/var/www/mlpack.\+ratml.\+org/mlpack.\+org/\+\_\+src/mlpack-\/3.\+3.\+2/src/mlpack/methods/amf/init\+\_\+rules/\textbf{ random\+\_\+acol\+\_\+init.\+hpp}\end{DoxyCompactItemize}
