\section{mlpack Namespace Reference}
\label{namespacemlpack}\index{mlpack@{mlpack}}


Linear algebra utility functions, generally performed on matrices or vectors.  


\subsection*{Namespaces}
\begin{DoxyCompactItemize}
\item 
 \textbf{ adaboost}
\item 
 \textbf{ amf}
\begin{DoxyCompactList}\small\item\em Alternating Matrix Factorization. \end{DoxyCompactList}\item 
 \textbf{ ann}
\begin{DoxyCompactList}\small\item\em Artificial Neural Network. \end{DoxyCompactList}\item 
 \textbf{ bindings}
\item 
 \textbf{ bound}
\item 
 \textbf{ cf}
\begin{DoxyCompactList}\small\item\em Collaborative filtering. \end{DoxyCompactList}\item 
 \textbf{ cv}
\item 
 \textbf{ data}
\begin{DoxyCompactList}\small\item\em Functions to load and save matrices and models. \end{DoxyCompactList}\item 
 \textbf{ dbscan}
\item 
 \textbf{ decision\+\_\+stump}
\item 
 \textbf{ det}
\begin{DoxyCompactList}\small\item\em Density Estimation Trees. \end{DoxyCompactList}\item 
 \textbf{ distribution}
\begin{DoxyCompactList}\small\item\em Probability distributions. \end{DoxyCompactList}\item 
 \textbf{ emst}
\begin{DoxyCompactList}\small\item\em Euclidean Minimum Spanning Trees. \end{DoxyCompactList}\item 
 \textbf{ fastmks}
\begin{DoxyCompactList}\small\item\em Fast max-\/kernel search. \end{DoxyCompactList}\item 
 \textbf{ gmm}
\begin{DoxyCompactList}\small\item\em Gaussian Mixture Models. \end{DoxyCompactList}\item 
 \textbf{ hmm}
\begin{DoxyCompactList}\small\item\em Hidden Markov Models. \end{DoxyCompactList}\item 
 \textbf{ hpt}
\item 
 \textbf{ kde}
\begin{DoxyCompactList}\small\item\em Kernel Density Estimation. \end{DoxyCompactList}\item 
 \textbf{ kernel}
\begin{DoxyCompactList}\small\item\em Kernel functions. \end{DoxyCompactList}\item 
 \textbf{ kmeans}
\begin{DoxyCompactList}\small\item\em K-\/\+Means clustering. \end{DoxyCompactList}\item 
 \textbf{ kpca}
\item 
 \textbf{ lcc}
\item 
 \textbf{ lmnn}
\begin{DoxyCompactList}\small\item\em Large Margin Nearest Neighbor. \end{DoxyCompactList}\item 
 \textbf{ math}
\begin{DoxyCompactList}\small\item\em Miscellaneous math routines. \end{DoxyCompactList}\item 
 \textbf{ matrix\+\_\+completion}
\item 
 \textbf{ meanshift}
\begin{DoxyCompactList}\small\item\em Mean shift clustering. \end{DoxyCompactList}\item 
 \textbf{ metric}
\item 
 \textbf{ mvu}
\item 
 \textbf{ naive\+\_\+bayes}
\begin{DoxyCompactList}\small\item\em The Naive Bayes Classifier. \end{DoxyCompactList}\item 
 \textbf{ nca}
\begin{DoxyCompactList}\small\item\em Neighborhood Components Analysis. \end{DoxyCompactList}\item 
 \textbf{ neighbor}
\item 
 \textbf{ nn}
\item 
 \textbf{ pca}
\item 
 \textbf{ perceptron}
\item 
 \textbf{ radical}
\item 
 \textbf{ range}
\begin{DoxyCompactList}\small\item\em Range-\/search routines. \end{DoxyCompactList}\item 
 \textbf{ regression}
\begin{DoxyCompactList}\small\item\em Regression methods. \end{DoxyCompactList}\item 
 \textbf{ rl}
\item 
 \textbf{ sfinae}
\item 
 \textbf{ sparse\+\_\+coding}
\item 
 \textbf{ svd}
\item 
 \textbf{ svm}
\item 
 \textbf{ tree}
\begin{DoxyCompactList}\small\item\em Trees and tree-\/building procedures. \end{DoxyCompactList}\item 
 \textbf{ util}
\end{DoxyCompactItemize}
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \textbf{ Backtrace}
\begin{DoxyCompactList}\small\item\em Provides a backtrace. \end{DoxyCompactList}\item 
class \textbf{ IO}
\begin{DoxyCompactList}\small\item\em Parses the command line for parameters and holds user-\/specified parameters. \end{DoxyCompactList}\item 
class \textbf{ Log}
\begin{DoxyCompactList}\small\item\em Provides a convenient way to give formatted output. \end{DoxyCompactList}\item 
class \textbf{ Timer}
\begin{DoxyCompactList}\small\item\em The timer class provides a way for mlpack methods to be timed. \end{DoxyCompactList}\item 
class \textbf{ Timers}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \textbf{ Check\+Matrices} (const arma\+::mat \&x, const arma\+::mat \&xmlX, const arma\+::mat \&textX, const arma\+::mat \&binaryX)
\item 
void \textbf{ Check\+Matrices} (const arma\+::\+Mat$<$ size\+\_\+t $>$ \&x, const arma\+::\+Mat$<$ size\+\_\+t $>$ \&xmlX, const arma\+::\+Mat$<$ size\+\_\+t $>$ \&textX, const arma\+::\+Mat$<$ size\+\_\+t $>$ \&binaryX)
\item 
void \textbf{ Check\+Matrices} (const arma\+::cube \&x, const arma\+::cube \&xmlX, const arma\+::cube \&textX, const arma\+::cube \&binaryX)
\item 
{\footnotesize template$<$typename T $>$ }\\T\+::elem\+\_\+type $\ast$ \textbf{ Get\+Memory} (T \&m)
\begin{DoxyCompactList}\small\item\em Return the matrix\textquotesingle{}s allocated memory pointer, unless the matrix is using its internal preallocated memory, in which case we copy that and return a pointer to the memory we just made. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename T , typename I\+Archive\+Type , typename O\+Archive\+Type $>$ }\\void \textbf{ Serialize\+Object} (T \&t, T \&newT)
\item 
{\footnotesize template$<$typename T $>$ }\\void \textbf{ Serialize\+Object\+All} (T \&t, T \&xmlT, T \&textT, T \&binaryT)
\item 
{\footnotesize template$<$typename T , typename I\+Archive\+Type , typename O\+Archive\+Type $>$ }\\void \textbf{ Serialize\+Pointer\+Object} (T $\ast$t, T $\ast$\&newT)
\item 
{\footnotesize template$<$typename T $>$ }\\void \textbf{ Serialize\+Pointer\+Object\+All} (T $\ast$t, T $\ast$\&xmlT, T $\ast$\&textT, T $\ast$\&binaryT)
\item 
{\footnotesize template$<$typename Cube\+Type $>$ }\\void \textbf{ Test\+All\+Armadillo\+Serialization} (arma\+::\+Cube$<$ Cube\+Type $>$ \&x)
\item 
{\footnotesize template$<$typename Mat\+Type $>$ }\\void \textbf{ Test\+All\+Armadillo\+Serialization} (Mat\+Type \&x)
\item 
{\footnotesize template$<$typename Cube\+Type , typename I\+Archive\+Type , typename O\+Archive\+Type $>$ }\\void \textbf{ Test\+Armadillo\+Serialization} (arma\+::\+Cube$<$ Cube\+Type $>$ \&x)
\item 
{\footnotesize template$<$typename Mat\+Type , typename I\+Archive\+Type , typename O\+Archive\+Type $>$ }\\void \textbf{ Test\+Armadillo\+Serialization} (Mat\+Type \&x)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Linear algebra utility functions, generally performed on matrices or vectors. 

This class is used to update the weight\+Vectors matrix according to the simple update rule as discussed by Rosenblatt\+:

if a vector x has been incorrectly classified by a weight w, then w = w -\/ x and w\textquotesingle{}= w\textquotesingle{}+ x

where w\textquotesingle{} is the weight vector which correctly classifies x. 

\subsection{Function Documentation}
\mbox{\label{namespacemlpack_a7ce98127176182f568779d09912a28c9}} 
\index{mlpack@{mlpack}!Check\+Matrices@{Check\+Matrices}}
\index{Check\+Matrices@{Check\+Matrices}!mlpack@{mlpack}}
\subsubsection{Check\+Matrices()\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily void Check\+Matrices (\begin{DoxyParamCaption}\item[{const arma\+::mat \&}]{x,  }\item[{const arma\+::mat \&}]{xmlX,  }\item[{const arma\+::mat \&}]{textX,  }\item[{const arma\+::mat \&}]{binaryX }\end{DoxyParamCaption})}



Referenced by Serialize\+Pointer\+Object\+All().

\mbox{\label{namespacemlpack_a324c6192b8e2844ebbdfbb8a86b208a8}} 
\index{mlpack@{mlpack}!Check\+Matrices@{Check\+Matrices}}
\index{Check\+Matrices@{Check\+Matrices}!mlpack@{mlpack}}
\subsubsection{Check\+Matrices()\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily void Check\+Matrices (\begin{DoxyParamCaption}\item[{const arma\+::\+Mat$<$ size\+\_\+t $>$ \&}]{x,  }\item[{const arma\+::\+Mat$<$ size\+\_\+t $>$ \&}]{xmlX,  }\item[{const arma\+::\+Mat$<$ size\+\_\+t $>$ \&}]{textX,  }\item[{const arma\+::\+Mat$<$ size\+\_\+t $>$ \&}]{binaryX }\end{DoxyParamCaption})}

\mbox{\label{namespacemlpack_af06aeca3a4ac425303294bf3ccf46f1c}} 
\index{mlpack@{mlpack}!Check\+Matrices@{Check\+Matrices}}
\index{Check\+Matrices@{Check\+Matrices}!mlpack@{mlpack}}
\subsubsection{Check\+Matrices()\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily void Check\+Matrices (\begin{DoxyParamCaption}\item[{const arma\+::cube \&}]{x,  }\item[{const arma\+::cube \&}]{xmlX,  }\item[{const arma\+::cube \&}]{textX,  }\item[{const arma\+::cube \&}]{binaryX }\end{DoxyParamCaption})}

\mbox{\label{namespacemlpack_ab0cc7f43ea0ea03a7654d61e7dea54e6}} 
\index{mlpack@{mlpack}!Get\+Memory@{Get\+Memory}}
\index{Get\+Memory@{Get\+Memory}!mlpack@{mlpack}}
\subsubsection{Get\+Memory()}
{\footnotesize\ttfamily T\+::elem\+\_\+type$\ast$ mlpack\+::\+Get\+Memory (\begin{DoxyParamCaption}\item[{T \&}]{m }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Return the matrix\textquotesingle{}s allocated memory pointer, unless the matrix is using its internal preallocated memory, in which case we copy that and return a pointer to the memory we just made. 



Definition at line 27 of file arma\+\_\+util.\+hpp.

\mbox{\label{namespacemlpack_a34601f787a1c92ad17c2897c2493b2c2}} 
\index{mlpack@{mlpack}!Serialize\+Object@{Serialize\+Object}}
\index{Serialize\+Object@{Serialize\+Object}!mlpack@{mlpack}}
\subsubsection{Serialize\+Object()}
{\footnotesize\ttfamily void Serialize\+Object (\begin{DoxyParamCaption}\item[{T \&}]{t,  }\item[{T \&}]{newT }\end{DoxyParamCaption})}



Definition at line 193 of file serialization.\+hpp.



References mlpack\+::data\+::binary, Filter\+File\+Name(), M\+L\+P\+A\+C\+K\+\_\+\+C\+E\+R\+R\+\_\+\+S\+T\+R\+E\+AM, and M\+L\+P\+A\+C\+K\+\_\+\+C\+O\+U\+T\+\_\+\+S\+T\+R\+E\+AM.



Referenced by Serialize\+Object\+All().

\mbox{\label{namespacemlpack_af14fd7ceed647d724ef5ed036517b322}} 
\index{mlpack@{mlpack}!Serialize\+Object\+All@{Serialize\+Object\+All}}
\index{Serialize\+Object\+All@{Serialize\+Object\+All}!mlpack@{mlpack}}
\subsubsection{Serialize\+Object\+All()}
{\footnotesize\ttfamily void Serialize\+Object\+All (\begin{DoxyParamCaption}\item[{T \&}]{t,  }\item[{T \&}]{xmlT,  }\item[{T \&}]{textT,  }\item[{T \&}]{binaryT }\end{DoxyParamCaption})}



Definition at line 240 of file serialization.\+hpp.



References Serialize\+Object().

\mbox{\label{namespacemlpack_a929d9bf339451382c03eeca5f4814550}} 
\index{mlpack@{mlpack}!Serialize\+Pointer\+Object@{Serialize\+Pointer\+Object}}
\index{Serialize\+Pointer\+Object@{Serialize\+Pointer\+Object}!mlpack@{mlpack}}
\subsubsection{Serialize\+Pointer\+Object()}
{\footnotesize\ttfamily void Serialize\+Pointer\+Object (\begin{DoxyParamCaption}\item[{T $\ast$}]{t,  }\item[{T $\ast$\&}]{newT }\end{DoxyParamCaption})}



Definition at line 252 of file serialization.\+hpp.



References mlpack\+::data\+::binary, Filter\+File\+Name(), and M\+L\+P\+A\+C\+K\+\_\+\+C\+O\+U\+T\+\_\+\+S\+T\+R\+E\+AM.



Referenced by Serialize\+Pointer\+Object\+All().

\mbox{\label{namespacemlpack_a5f3f8539f11cc07f8f1f84899cedfc3f}} 
\index{mlpack@{mlpack}!Serialize\+Pointer\+Object\+All@{Serialize\+Pointer\+Object\+All}}
\index{Serialize\+Pointer\+Object\+All@{Serialize\+Pointer\+Object\+All}!mlpack@{mlpack}}
\subsubsection{Serialize\+Pointer\+Object\+All()}
{\footnotesize\ttfamily void Serialize\+Pointer\+Object\+All (\begin{DoxyParamCaption}\item[{T $\ast$}]{t,  }\item[{T $\ast$\&}]{xmlT,  }\item[{T $\ast$\&}]{textT,  }\item[{T $\ast$\&}]{binaryT }\end{DoxyParamCaption})}



Definition at line 297 of file serialization.\+hpp.



References Check\+Matrices(), and Serialize\+Pointer\+Object().

\mbox{\label{namespacemlpack_a6e296224def20937cb45cfc0eced411f}} 
\index{mlpack@{mlpack}!Test\+All\+Armadillo\+Serialization@{Test\+All\+Armadillo\+Serialization}}
\index{Test\+All\+Armadillo\+Serialization@{Test\+All\+Armadillo\+Serialization}!mlpack@{mlpack}}
\subsubsection{Test\+All\+Armadillo\+Serialization()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily void Test\+All\+Armadillo\+Serialization (\begin{DoxyParamCaption}\item[{arma\+::\+Cube$<$ Cube\+Type $>$ \&}]{x }\end{DoxyParamCaption})}



Definition at line 106 of file serialization.\+hpp.



References Test\+Armadillo\+Serialization().

\mbox{\label{namespacemlpack_ad4a3b7452269fcd2adcf7242818d3455}} 
\index{mlpack@{mlpack}!Test\+All\+Armadillo\+Serialization@{Test\+All\+Armadillo\+Serialization}}
\index{Test\+All\+Armadillo\+Serialization@{Test\+All\+Armadillo\+Serialization}!mlpack@{mlpack}}
\subsubsection{Test\+All\+Armadillo\+Serialization()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily void Test\+All\+Armadillo\+Serialization (\begin{DoxyParamCaption}\item[{Mat\+Type \&}]{x }\end{DoxyParamCaption})}



Definition at line 180 of file serialization.\+hpp.



References Test\+Armadillo\+Serialization().

\mbox{\label{namespacemlpack_ac2970e28e9be01fb918a9a60bdc6a1e1}} 
\index{mlpack@{mlpack}!Test\+Armadillo\+Serialization@{Test\+Armadillo\+Serialization}}
\index{Test\+Armadillo\+Serialization@{Test\+Armadillo\+Serialization}!mlpack@{mlpack}}
\subsubsection{Test\+Armadillo\+Serialization()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily void Test\+Armadillo\+Serialization (\begin{DoxyParamCaption}\item[{arma\+::\+Cube$<$ Cube\+Type $>$ \&}]{x }\end{DoxyParamCaption})}



Definition at line 33 of file serialization.\+hpp.



References mlpack\+::data\+::binary, and Filter\+File\+Name().



Referenced by Test\+All\+Armadillo\+Serialization().

\mbox{\label{namespacemlpack_aaef2908acc6555dc4d394eb28022e2a7}} 
\index{mlpack@{mlpack}!Test\+Armadillo\+Serialization@{Test\+Armadillo\+Serialization}}
\index{Test\+Armadillo\+Serialization@{Test\+Armadillo\+Serialization}!mlpack@{mlpack}}
\subsubsection{Test\+Armadillo\+Serialization()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily void Test\+Armadillo\+Serialization (\begin{DoxyParamCaption}\item[{Mat\+Type \&}]{x }\end{DoxyParamCaption})}



Definition at line 120 of file serialization.\+hpp.



References mlpack\+::data\+::binary, and Filter\+File\+Name().

