\section{mlpack\+:\+:hmm Namespace Reference}
\label{namespacemlpack_1_1hmm}\index{mlpack\+::hmm@{mlpack\+::hmm}}


Hidden Markov Models.  


\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \textbf{ H\+MM}
\begin{DoxyCompactList}\small\item\em A class that represents a Hidden Markov Model with an arbitrary type of emission distribution. \end{DoxyCompactList}\item 
class \textbf{ H\+M\+M\+Model}
\begin{DoxyCompactList}\small\item\em A serializable \doxyref{H\+MM}{p.}{classmlpack_1_1hmm_1_1HMM} model that also stores the type. \end{DoxyCompactList}\item 
class \textbf{ H\+M\+M\+Regression}
\begin{DoxyCompactList}\small\item\em A class that represents a Hidden Markov Model Regression (H\+M\+MR). \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ H\+M\+M\+Type} \+: char \{ \newline
\textbf{ Discrete\+H\+MM} = 0, 
\newline
\textbf{ Gaussian\+H\+MM}, 
\newline
\textbf{ Gaussian\+Mixture\+Model\+H\+MM}, 
\newline
\textbf{ Diagonal\+Gaussian\+Mixture\+Model\+H\+MM}, 
\newline
\textbf{ Discrete\+H\+MM} = 0, 
\newline
\textbf{ Gaussian\+H\+MM}, 
\newline
\textbf{ Gaussian\+Mixture\+Model\+H\+MM}, 
\newline
\textbf{ Diagonal\+Gaussian\+Mixture\+Model\+H\+MM}
 \}
\item 
enum \textbf{ H\+M\+M\+Type} \+: char \{ \newline
\textbf{ Discrete\+H\+MM} = 0, 
\newline
\textbf{ Gaussian\+H\+MM}, 
\newline
\textbf{ Gaussian\+Mixture\+Model\+H\+MM}, 
\newline
\textbf{ Diagonal\+Gaussian\+Mixture\+Model\+H\+MM}, 
\newline
\textbf{ Discrete\+H\+MM} = 0, 
\newline
\textbf{ Gaussian\+H\+MM}, 
\newline
\textbf{ Gaussian\+Mixture\+Model\+H\+MM}, 
\newline
\textbf{ Diagonal\+Gaussian\+Mixture\+Model\+H\+MM}
 \}\begin{DoxyCompactList}\small\item\em H\+M\+M\+Type, to be stored on disk. \end{DoxyCompactList}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename Action\+Type , typename Extra\+Info\+Type  = void$>$ }\\void \textbf{ Load\+H\+M\+M\+And\+Perform\+Action} (const std\+::string \&model\+File, Extra\+Info\+Type $\ast$x=N\+U\+LL)
\begin{DoxyCompactList}\small\item\em Action\+Type should implement static void Apply(\+H\+M\+M\+Type\&). \end{DoxyCompactList}\item 
{\footnotesize template$<$typename H\+M\+M\+Type $>$ }\\void \textbf{ Save\+H\+MM} (\textbf{ H\+M\+M\+Type} \&hmm, const std\+::string \&model\+File)
\begin{DoxyCompactList}\small\item\em Save an \doxyref{H\+MM}{p.}{classmlpack_1_1hmm_1_1HMM} to a file. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Hidden Markov Models. 



\subsection{Enumeration Type Documentation}
\mbox{\label{namespacemlpack_1_1hmm_a79ea7de57741e9a6014dbda957c1a16c}} 
\index{mlpack\+::hmm@{mlpack\+::hmm}!H\+M\+M\+Type@{H\+M\+M\+Type}}
\index{H\+M\+M\+Type@{H\+M\+M\+Type}!mlpack\+::hmm@{mlpack\+::hmm}}
\subsubsection{H\+M\+M\+Type\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily enum \textbf{ H\+M\+M\+Type} \+: char}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{Discrete\+H\+MM@{Discrete\+H\+MM}!mlpack\+::hmm@{mlpack\+::hmm}}\index{mlpack\+::hmm@{mlpack\+::hmm}!Discrete\+H\+MM@{Discrete\+H\+MM}}}\mbox{\label{namespacemlpack_1_1hmm_a79ea7de57741e9a6014dbda957c1a16ca64734afa619ac2b99385e32727f85ff1}} 
Discrete\+H\+MM&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{Gaussian\+H\+MM@{Gaussian\+H\+MM}!mlpack\+::hmm@{mlpack\+::hmm}}\index{mlpack\+::hmm@{mlpack\+::hmm}!Gaussian\+H\+MM@{Gaussian\+H\+MM}}}\mbox{\label{namespacemlpack_1_1hmm_a79ea7de57741e9a6014dbda957c1a16ca74e1b407727f5d574e3105d78ee5ffe3}} 
Gaussian\+H\+MM&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{Gaussian\+Mixture\+Model\+H\+MM@{Gaussian\+Mixture\+Model\+H\+MM}!mlpack\+::hmm@{mlpack\+::hmm}}\index{mlpack\+::hmm@{mlpack\+::hmm}!Gaussian\+Mixture\+Model\+H\+MM@{Gaussian\+Mixture\+Model\+H\+MM}}}\mbox{\label{namespacemlpack_1_1hmm_a79ea7de57741e9a6014dbda957c1a16ca7e049029f4e8b94057bf0925e1601b78}} 
Gaussian\+Mixture\+Model\+H\+MM&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{Diagonal\+Gaussian\+Mixture\+Model\+H\+MM@{Diagonal\+Gaussian\+Mixture\+Model\+H\+MM}!mlpack\+::hmm@{mlpack\+::hmm}}\index{mlpack\+::hmm@{mlpack\+::hmm}!Diagonal\+Gaussian\+Mixture\+Model\+H\+MM@{Diagonal\+Gaussian\+Mixture\+Model\+H\+MM}}}\mbox{\label{namespacemlpack_1_1hmm_a79ea7de57741e9a6014dbda957c1a16ca792ff370f9e0e105b8c923132979f8eb}} 
Diagonal\+Gaussian\+Mixture\+Model\+H\+MM&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{Discrete\+H\+MM@{Discrete\+H\+MM}!mlpack\+::hmm@{mlpack\+::hmm}}\index{mlpack\+::hmm@{mlpack\+::hmm}!Discrete\+H\+MM@{Discrete\+H\+MM}}}\mbox{\label{namespacemlpack_1_1hmm_a79ea7de57741e9a6014dbda957c1a16ca64734afa619ac2b99385e32727f85ff1}} 
Discrete\+H\+MM&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{Gaussian\+H\+MM@{Gaussian\+H\+MM}!mlpack\+::hmm@{mlpack\+::hmm}}\index{mlpack\+::hmm@{mlpack\+::hmm}!Gaussian\+H\+MM@{Gaussian\+H\+MM}}}\mbox{\label{namespacemlpack_1_1hmm_a79ea7de57741e9a6014dbda957c1a16ca74e1b407727f5d574e3105d78ee5ffe3}} 
Gaussian\+H\+MM&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{Gaussian\+Mixture\+Model\+H\+MM@{Gaussian\+Mixture\+Model\+H\+MM}!mlpack\+::hmm@{mlpack\+::hmm}}\index{mlpack\+::hmm@{mlpack\+::hmm}!Gaussian\+Mixture\+Model\+H\+MM@{Gaussian\+Mixture\+Model\+H\+MM}}}\mbox{\label{namespacemlpack_1_1hmm_a79ea7de57741e9a6014dbda957c1a16ca7e049029f4e8b94057bf0925e1601b78}} 
Gaussian\+Mixture\+Model\+H\+MM&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{Diagonal\+Gaussian\+Mixture\+Model\+H\+MM@{Diagonal\+Gaussian\+Mixture\+Model\+H\+MM}!mlpack\+::hmm@{mlpack\+::hmm}}\index{mlpack\+::hmm@{mlpack\+::hmm}!Diagonal\+Gaussian\+Mixture\+Model\+H\+MM@{Diagonal\+Gaussian\+Mixture\+Model\+H\+MM}}}\mbox{\label{namespacemlpack_1_1hmm_a79ea7de57741e9a6014dbda957c1a16ca792ff370f9e0e105b8c923132979f8eb}} 
Diagonal\+Gaussian\+Mixture\+Model\+H\+MM&\\
\hline

\end{DoxyEnumFields}


Definition at line 22 of file hmm\+\_\+model.\+hpp.

\mbox{\label{namespacemlpack_1_1hmm_a79ea7de57741e9a6014dbda957c1a16c}} 
\index{mlpack\+::hmm@{mlpack\+::hmm}!H\+M\+M\+Type@{H\+M\+M\+Type}}
\index{H\+M\+M\+Type@{H\+M\+M\+Type}!mlpack\+::hmm@{mlpack\+::hmm}}
\subsubsection{H\+M\+M\+Type\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily enum \textbf{ H\+M\+M\+Type} \+: char}



H\+M\+M\+Type, to be stored on disk. 

This is of type char, which is one byte. (I\textquotesingle{}m not sure what will happen on systems where one byte is not eight bits.) \begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{Discrete\+H\+MM@{Discrete\+H\+MM}!mlpack\+::hmm@{mlpack\+::hmm}}\index{mlpack\+::hmm@{mlpack\+::hmm}!Discrete\+H\+MM@{Discrete\+H\+MM}}}\mbox{\label{namespacemlpack_1_1hmm_a79ea7de57741e9a6014dbda957c1a16ca64734afa619ac2b99385e32727f85ff1}} 
Discrete\+H\+MM&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{Gaussian\+H\+MM@{Gaussian\+H\+MM}!mlpack\+::hmm@{mlpack\+::hmm}}\index{mlpack\+::hmm@{mlpack\+::hmm}!Gaussian\+H\+MM@{Gaussian\+H\+MM}}}\mbox{\label{namespacemlpack_1_1hmm_a79ea7de57741e9a6014dbda957c1a16ca74e1b407727f5d574e3105d78ee5ffe3}} 
Gaussian\+H\+MM&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{Gaussian\+Mixture\+Model\+H\+MM@{Gaussian\+Mixture\+Model\+H\+MM}!mlpack\+::hmm@{mlpack\+::hmm}}\index{mlpack\+::hmm@{mlpack\+::hmm}!Gaussian\+Mixture\+Model\+H\+MM@{Gaussian\+Mixture\+Model\+H\+MM}}}\mbox{\label{namespacemlpack_1_1hmm_a79ea7de57741e9a6014dbda957c1a16ca7e049029f4e8b94057bf0925e1601b78}} 
Gaussian\+Mixture\+Model\+H\+MM&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{Diagonal\+Gaussian\+Mixture\+Model\+H\+MM@{Diagonal\+Gaussian\+Mixture\+Model\+H\+MM}!mlpack\+::hmm@{mlpack\+::hmm}}\index{mlpack\+::hmm@{mlpack\+::hmm}!Diagonal\+Gaussian\+Mixture\+Model\+H\+MM@{Diagonal\+Gaussian\+Mixture\+Model\+H\+MM}}}\mbox{\label{namespacemlpack_1_1hmm_a79ea7de57741e9a6014dbda957c1a16ca792ff370f9e0e105b8c923132979f8eb}} 
Diagonal\+Gaussian\+Mixture\+Model\+H\+MM&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{Discrete\+H\+MM@{Discrete\+H\+MM}!mlpack\+::hmm@{mlpack\+::hmm}}\index{mlpack\+::hmm@{mlpack\+::hmm}!Discrete\+H\+MM@{Discrete\+H\+MM}}}\mbox{\label{namespacemlpack_1_1hmm_a79ea7de57741e9a6014dbda957c1a16ca64734afa619ac2b99385e32727f85ff1}} 
Discrete\+H\+MM&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{Gaussian\+H\+MM@{Gaussian\+H\+MM}!mlpack\+::hmm@{mlpack\+::hmm}}\index{mlpack\+::hmm@{mlpack\+::hmm}!Gaussian\+H\+MM@{Gaussian\+H\+MM}}}\mbox{\label{namespacemlpack_1_1hmm_a79ea7de57741e9a6014dbda957c1a16ca74e1b407727f5d574e3105d78ee5ffe3}} 
Gaussian\+H\+MM&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{Gaussian\+Mixture\+Model\+H\+MM@{Gaussian\+Mixture\+Model\+H\+MM}!mlpack\+::hmm@{mlpack\+::hmm}}\index{mlpack\+::hmm@{mlpack\+::hmm}!Gaussian\+Mixture\+Model\+H\+MM@{Gaussian\+Mixture\+Model\+H\+MM}}}\mbox{\label{namespacemlpack_1_1hmm_a79ea7de57741e9a6014dbda957c1a16ca7e049029f4e8b94057bf0925e1601b78}} 
Gaussian\+Mixture\+Model\+H\+MM&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{Diagonal\+Gaussian\+Mixture\+Model\+H\+MM@{Diagonal\+Gaussian\+Mixture\+Model\+H\+MM}!mlpack\+::hmm@{mlpack\+::hmm}}\index{mlpack\+::hmm@{mlpack\+::hmm}!Diagonal\+Gaussian\+Mixture\+Model\+H\+MM@{Diagonal\+Gaussian\+Mixture\+Model\+H\+MM}}}\mbox{\label{namespacemlpack_1_1hmm_a79ea7de57741e9a6014dbda957c1a16ca792ff370f9e0e105b8c923132979f8eb}} 
Diagonal\+Gaussian\+Mixture\+Model\+H\+MM&\\
\hline

\end{DoxyEnumFields}


Definition at line 22 of file hmm\+\_\+util.\+hpp.



\subsection{Function Documentation}
\mbox{\label{namespacemlpack_1_1hmm_a096edad8f73173064a7dcc8bc5626298}} 
\index{mlpack\+::hmm@{mlpack\+::hmm}!Load\+H\+M\+M\+And\+Perform\+Action@{Load\+H\+M\+M\+And\+Perform\+Action}}
\index{Load\+H\+M\+M\+And\+Perform\+Action@{Load\+H\+M\+M\+And\+Perform\+Action}!mlpack\+::hmm@{mlpack\+::hmm}}
\subsubsection{Load\+H\+M\+M\+And\+Perform\+Action()}
{\footnotesize\ttfamily void mlpack\+::hmm\+::\+Load\+H\+M\+M\+And\+Perform\+Action (\begin{DoxyParamCaption}\item[{const std\+::string \&}]{model\+File,  }\item[{Extra\+Info\+Type $\ast$}]{x = {\ttfamily NULL} }\end{DoxyParamCaption})}



Action\+Type should implement static void Apply(\+H\+M\+M\+Type\&). 

\mbox{\label{namespacemlpack_1_1hmm_a35e2585a8da30e70484008c4e2a56972}} 
\index{mlpack\+::hmm@{mlpack\+::hmm}!Save\+H\+MM@{Save\+H\+MM}}
\index{Save\+H\+MM@{Save\+H\+MM}!mlpack\+::hmm@{mlpack\+::hmm}}
\subsubsection{Save\+H\+M\+M()}
{\footnotesize\ttfamily void mlpack\+::hmm\+::\+Save\+H\+MM (\begin{DoxyParamCaption}\item[{\textbf{ H\+M\+M\+Type} \&}]{hmm,  }\item[{const std\+::string \&}]{model\+File }\end{DoxyParamCaption})}



Save an \doxyref{H\+MM}{p.}{classmlpack_1_1hmm_1_1HMM} to a file. 

The file must also encode what type of \doxyref{H\+MM}{p.}{classmlpack_1_1hmm_1_1HMM} is being stored. 