\section{Random\+Initialization Class Reference}
\label{classmlpack_1_1amf_1_1RandomInitialization}\index{Random\+Initialization@{Random\+Initialization}}


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].  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Random\+Initialization} ()
\item 
{\footnotesize template$<$typename Mat\+Type $>$ }\\void \textbf{ Initialize\+One} (const Mat\+Type \&V, const size\+\_\+t r, arma\+::mat \&M, const bool which\+Matrix=true)
\begin{DoxyCompactList}\small\item\em Fill W or H with random uniform noise. \end{DoxyCompactList}\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)
\begin{DoxyCompactList}\small\item\em Fill W and H with random uniform noise. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
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]. 

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



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



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



\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1amf_1_1RandomInitialization_a02a3610958f42b7dbef8bd5063ceaee7}} 
\index{mlpack\+::amf\+::\+Random\+Initialization@{mlpack\+::amf\+::\+Random\+Initialization}!Initialize@{Initialize}}
\index{Initialize@{Initialize}!mlpack\+::amf\+::\+Random\+Initialization@{mlpack\+::amf\+::\+Random\+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]}}



Fill W and H with random uniform noise. 


\begin{DoxyParams}{Parameters}
{\em V} & Input matrix. \\
\hline
{\em r} & Rank of decomposition. \\
\hline
{\em W} & W matrix, to be filled with random noise. \\
\hline
{\em H} & H matrix, to be filled with random noise. \\
\hline
\end{DoxyParams}


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

\mbox{\label{classmlpack_1_1amf_1_1RandomInitialization_ab36c483763ea43179dd94fac38e29f03}} 
\index{mlpack\+::amf\+::\+Random\+Initialization@{mlpack\+::amf\+::\+Random\+Initialization}!Initialize\+One@{Initialize\+One}}
\index{Initialize\+One@{Initialize\+One}!mlpack\+::amf\+::\+Random\+Initialization@{mlpack\+::amf\+::\+Random\+Initialization}}
\subsubsection{Initialize\+One()}
{\footnotesize\ttfamily void Initialize\+One (\begin{DoxyParamCaption}\item[{const Mat\+Type \&}]{V,  }\item[{const size\+\_\+t}]{r,  }\item[{arma\+::mat \&}]{M,  }\item[{const bool}]{which\+Matrix = {\ttfamily true} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Fill W or H with random uniform noise. 


\begin{DoxyParams}{Parameters}
{\em V} & Input matrix. \\
\hline
{\em r} & Rank of decomposition. \\
\hline
{\em M} & W or H matrix, to be filled with random noise. \\
\hline
{\em which\+Matrix} & If true, initialize W. Otherwise, initialize H. \\
\hline
\end{DoxyParams}


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

\mbox{\label{classmlpack_1_1amf_1_1RandomInitialization_aa5b3dd8336182f751ebec27167c22415}} 
\index{mlpack\+::amf\+::\+Random\+Initialization@{mlpack\+::amf\+::\+Random\+Initialization}!serialize@{serialize}}
\index{serialize@{serialize}!mlpack\+::amf\+::\+Random\+Initialization@{mlpack\+::amf\+::\+Random\+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 85 of file random\+\_\+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-\/git/src/mlpack/methods/amf/init\+\_\+rules/\textbf{ random\+\_\+init.\+hpp}\end{DoxyCompactItemize}
