\section{H\+MM$<$ Distribution $>$ Class Template Reference}
\label{classmlpack_1_1hmm_1_1HMM}\index{H\+M\+M$<$ Distribution $>$@{H\+M\+M$<$ Distribution $>$}}


A class that represents a Hidden Markov Model with an arbitrary type of emission distribution.  




Inheritance diagram for H\+MM$<$ Distribution $>$\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classmlpack_1_1hmm_1_1HMM__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ H\+MM} (const size\+\_\+t states=0, const Distribution emissions=Distribution(), const double tolerance=1e-\/5)
\begin{DoxyCompactList}\small\item\em Create the Hidden Markov Model with the given number of hidden states and the given default distribution for emissions. \end{DoxyCompactList}\item 
\textbf{ H\+MM} (const arma\+::vec \&initial, const arma\+::mat \&transition, const std\+::vector$<$ Distribution $>$ \&\textbf{ emission}, const double tolerance=1e-\/5)
\begin{DoxyCompactList}\small\item\em Create the Hidden Markov Model with the given initial probability vector, the given transition matrix, and the given emission distributions. \end{DoxyCompactList}\item 
\textbf{ B\+O\+O\+S\+T\+\_\+\+S\+E\+R\+I\+A\+L\+I\+Z\+A\+T\+I\+O\+N\+\_\+\+S\+P\+L\+I\+T\+\_\+\+M\+E\+M\+B\+ER} ()
\item 
size\+\_\+t \textbf{ Dimensionality} () const
\begin{DoxyCompactList}\small\item\em Get the dimensionality of observations. \end{DoxyCompactList}\item 
size\+\_\+t \& \textbf{ Dimensionality} ()
\begin{DoxyCompactList}\small\item\em Set the dimensionality of observations. \end{DoxyCompactList}\item 
const std\+::vector$<$ Distribution $>$ \& \textbf{ Emission} () const
\begin{DoxyCompactList}\small\item\em Return the emission distributions. \end{DoxyCompactList}\item 
std\+::vector$<$ Distribution $>$ \& \textbf{ Emission} ()
\begin{DoxyCompactList}\small\item\em Return a modifiable emission probability matrix reference. \end{DoxyCompactList}\item 
double \textbf{ Estimate} (const arma\+::mat \&data\+Seq, arma\+::mat \&state\+Prob, arma\+::mat \&forward\+Prob, arma\+::mat \&backward\+Prob, arma\+::vec \&scales) const
\begin{DoxyCompactList}\small\item\em Estimate the probabilities of each hidden state at each time step for each given data observation, using the Forward-\/\+Backward algorithm. \end{DoxyCompactList}\item 
double \textbf{ Estimate} (const arma\+::mat \&data\+Seq, arma\+::mat \&state\+Prob) const
\begin{DoxyCompactList}\small\item\em Estimate the probabilities of each hidden state at each time step of each given data observation, using the Forward-\/\+Backward algorithm. \end{DoxyCompactList}\item 
void \textbf{ Filter} (const arma\+::mat \&data\+Seq, arma\+::mat \&filter\+Seq, size\+\_\+t ahead=0) const
\begin{DoxyCompactList}\small\item\em \doxyref{H\+MM}{p.}{classmlpack_1_1hmm_1_1HMM} filtering. \end{DoxyCompactList}\item 
void \textbf{ Generate} (const size\+\_\+t length, arma\+::mat \&data\+Sequence, arma\+::\+Row$<$ size\+\_\+t $>$ \&state\+Sequence, const size\+\_\+t start\+State=0) const
\begin{DoxyCompactList}\small\item\em Generate a random data sequence of the given length. \end{DoxyCompactList}\item 
const arma\+::vec \& \textbf{ Initial} () const
\begin{DoxyCompactList}\small\item\em Return the vector of initial state probabilities. \end{DoxyCompactList}\item 
arma\+::vec \& \textbf{ Initial} ()
\begin{DoxyCompactList}\small\item\em Modify the vector of initial state probabilities. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Archive $>$ }\\void \textbf{ load} (Archive \&ar, const unsigned int version)
\begin{DoxyCompactList}\small\item\em Load the object. \end{DoxyCompactList}\item 
double \textbf{ Log\+Estimate} (const arma\+::mat \&data\+Seq, arma\+::mat \&state\+Log\+Prob, arma\+::mat \&forward\+Log\+Prob, arma\+::mat \&backward\+Log\+Prob, arma\+::vec \&log\+Scales) const
\begin{DoxyCompactList}\small\item\em Estimate the probabilities of each hidden state at each time step for each given data observation, using the Forward-\/\+Backward algorithm. \end{DoxyCompactList}\item 
double \textbf{ Log\+Likelihood} (const arma\+::mat \&data\+Seq) const
\begin{DoxyCompactList}\small\item\em Compute the log-\/likelihood of the given data sequence. \end{DoxyCompactList}\item 
double \textbf{ Predict} (const arma\+::mat \&data\+Seq, arma\+::\+Row$<$ size\+\_\+t $>$ \&state\+Seq) const
\begin{DoxyCompactList}\small\item\em Compute the most probable hidden state sequence for the given data sequence, using the Viterbi algorithm, returning the log-\/likelihood of the most likely state sequence. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Archive $>$ }\\void \textbf{ save} (Archive \&ar, const unsigned int version) const
\begin{DoxyCompactList}\small\item\em Save the object. \end{DoxyCompactList}\item 
void \textbf{ Smooth} (const arma\+::mat \&data\+Seq, arma\+::mat \&smooth\+Seq) const
\begin{DoxyCompactList}\small\item\em \doxyref{H\+MM}{p.}{classmlpack_1_1hmm_1_1HMM} smoothing. \end{DoxyCompactList}\item 
double \textbf{ Tolerance} () const
\begin{DoxyCompactList}\small\item\em Get the tolerance of the Baum-\/\+Welch algorithm. \end{DoxyCompactList}\item 
double \& \textbf{ Tolerance} ()
\begin{DoxyCompactList}\small\item\em Modify the tolerance of the Baum-\/\+Welch algorithm. \end{DoxyCompactList}\item 
double \textbf{ Train} (const std\+::vector$<$ arma\+::mat $>$ \&data\+Seq)
\begin{DoxyCompactList}\small\item\em Train the model using the Baum-\/\+Welch algorithm, with only the given unlabeled observations. \end{DoxyCompactList}\item 
void \textbf{ Train} (const std\+::vector$<$ arma\+::mat $>$ \&data\+Seq, const std\+::vector$<$ arma\+::\+Row$<$ size\+\_\+t $>$ $>$ \&state\+Seq)
\begin{DoxyCompactList}\small\item\em Train the model using the given labeled observations; the transition and emission matrices are directly estimated. \end{DoxyCompactList}\item 
const arma\+::mat \& \textbf{ Transition} () const
\begin{DoxyCompactList}\small\item\em Return the transition matrix. \end{DoxyCompactList}\item 
arma\+::mat \& \textbf{ Transition} ()
\begin{DoxyCompactList}\small\item\em Return a modifiable transition matrix reference. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
void \textbf{ Backward} (const arma\+::mat \&data\+Seq, const arma\+::vec \&log\+Scales, arma\+::mat \&backward\+Log\+Prob) const
\begin{DoxyCompactList}\small\item\em The Backward algorithm (part of the Forward-\/\+Backward algorithm). \end{DoxyCompactList}\item 
void \textbf{ Forward} (const arma\+::mat \&data\+Seq, arma\+::vec \&log\+Scales, arma\+::mat \&forward\+Log\+Prob) const
\begin{DoxyCompactList}\small\item\em The Forward algorithm (part of the Forward-\/\+Backward algorithm). \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
std\+::vector$<$ Distribution $>$ \textbf{ emission}
\begin{DoxyCompactList}\small\item\em Set of emission probability distributions; one for each state. \end{DoxyCompactList}\item 
arma\+::mat \textbf{ log\+Transition}
\begin{DoxyCompactList}\small\item\em Transition probability matrix. No need to be mutable in mlpack 4.\+0. \end{DoxyCompactList}\item 
arma\+::mat \textbf{ transition\+Proxy}
\begin{DoxyCompactList}\small\item\em A proxy variable in linear space for log\+Transition. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename Distribution = distribution\+::\+Discrete\+Distribution$>$\newline
class mlpack\+::hmm\+::\+H\+M\+M$<$ Distribution $>$}

A class that represents a Hidden Markov Model with an arbitrary type of emission distribution. 

This \doxyref{H\+MM}{p.}{classmlpack_1_1hmm_1_1HMM} class supports training (supervised and unsupervised), prediction of state sequences via the Viterbi algorithm, estimation of state probabilities, generation of random sequences, and calculation of the log-\/likelihood of a given sequence.

The template parameter, Distribution, specifies the distribution which the emissions follow. The class should implement the following functions\+:


\begin{DoxyCode}
\textcolor{keyword}{class }Distribution
\{
 \textcolor{keyword}{public}:
  \textcolor{comment}{// The type of observation used by this distribution.}
  \textcolor{keyword}{typedef} something DataType;

  \textcolor{comment}{// Return the probability of the given observation.}
  \textcolor{keywordtype}{double} Probability(\textcolor{keyword}{const} DataType& observation) \textcolor{keyword}{const};

  \textcolor{comment}{// Estimate the distribution based on the given observations.}
  \textcolor{keywordtype}{double} Train(\textcolor{keyword}{const} std::vector<DataType>& observations);

  \textcolor{comment}{// Estimate the distribution based on the given observations, given also}
  \textcolor{comment}{// the probability of each observation coming from this distribution.}
  \textcolor{keywordtype}{double} Train(\textcolor{keyword}{const} std::vector<DataType>& observations,
               \textcolor{keyword}{const} std::vector<double>& probabilities);
\};
\end{DoxyCode}


See the \doxyref{mlpack\+::distribution\+::\+Discrete\+Distribution}{p.}{classmlpack_1_1distribution_1_1DiscreteDistribution} class for an example. One would use the Discrete\+Distribution class when the observations are non-\/negative integers. Other distributions could be Gaussians, a mixture of Gaussians (G\+MM), or any other probability distribution implementing the four Distribution functions.

Usage of the \doxyref{H\+MM}{p.}{classmlpack_1_1hmm_1_1HMM} class generally involves either training an \doxyref{H\+MM}{p.}{classmlpack_1_1hmm_1_1HMM} or loading an already-\/known \doxyref{H\+MM}{p.}{classmlpack_1_1hmm_1_1HMM} and taking probability measurements of sequences. Example code for supervised training of a Gaussian \doxyref{H\+MM}{p.}{classmlpack_1_1hmm_1_1HMM} (that is, where the emission output distribution is a single Gaussian for each hidden state) is given below.


\begin{DoxyCode}
\textcolor{keyword}{extern} arma::mat observations; \textcolor{comment}{// Each column is an observation.}
\textcolor{keyword}{extern} arma::Row<size\_t> states; \textcolor{comment}{// Hidden states for each observation.}
\textcolor{comment}{// Create an untrained HMM with 5 hidden states and default (N(0, 1))}
\textcolor{comment}{// Gaussian distributions with the dimensionality of the dataset.}
HMM<GaussianDistribution> hmm(5, GaussianDistribution(observations.n\_rows));

\textcolor{comment}{// Train the HMM (the labels could be omitted to perform unsupervised}
\textcolor{comment}{// training).}
hmm.Train(observations, states);
\end{DoxyCode}


Once initialized, the \doxyref{H\+MM}{p.}{classmlpack_1_1hmm_1_1HMM} can evaluate the probability of a certain sequence (with \doxyref{Log\+Likelihood()}{p.}{classmlpack_1_1hmm_1_1HMM_aa8f3f0b515cc08f9476e435bb2d13210}), predict the most likely sequence of hidden states (with \doxyref{Predict()}{p.}{classmlpack_1_1hmm_1_1HMM_a3b7ef0aafafd5d5a4300c07b110807a4}), generate a sequence (with \doxyref{Generate()}{p.}{classmlpack_1_1hmm_1_1HMM_aaada1e3c4a467d13ded6cfbb0d332898}), or estimate the probabilities of each state for a sequence of observations (with \doxyref{Train()}{p.}{classmlpack_1_1hmm_1_1HMM_a0b3a1148721ee3e77bad0b987ca3973d}).


\begin{DoxyTemplParams}{Template Parameters}
{\em Distribution} & Type of emission distribution for this \doxyref{H\+MM}{p.}{classmlpack_1_1hmm_1_1HMM}. \\
\hline
\end{DoxyTemplParams}


Definition at line 85 of file hmm.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\label{classmlpack_1_1hmm_1_1HMM_a20f7ef2bfbbbfe4b01733e1e0104e17b}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!H\+MM@{H\+MM}}
\index{H\+MM@{H\+MM}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{H\+M\+M()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \textbf{ H\+MM} (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{states = {\ttfamily 0},  }\item[{const Distribution}]{emissions = {\ttfamily Distribution()},  }\item[{const double}]{tolerance = {\ttfamily 1e-\/5} }\end{DoxyParamCaption})}



Create the Hidden Markov Model with the given number of hidden states and the given default distribution for emissions. 

The dimensionality of the observations is taken from the emissions variable, so it is important that the given default emission distribution is set with the correct dimensionality. Alternately, set the dimensionality with \doxyref{Dimensionality()}{p.}{classmlpack_1_1hmm_1_1HMM_a787adc650f11b9430f6bd0b937bbe6b0}. Optionally, the tolerance for convergence of the Baum-\/\+Welch algorithm can be set.

By default, the transition matrix and initial probability vector are set to contain equal probability for each state.


\begin{DoxyParams}{Parameters}
{\em states} & Number of states. \\
\hline
{\em emissions} & Default distribution for emissions. \\
\hline
{\em tolerance} & Tolerance for convergence of training algorithm (Baum-\/\+Welch). \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1hmm_1_1HMM_ac173a0c0e119519329525a892f8848e7}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!H\+MM@{H\+MM}}
\index{H\+MM@{H\+MM}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{H\+M\+M()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \textbf{ H\+MM} (\begin{DoxyParamCaption}\item[{const arma\+::vec \&}]{initial,  }\item[{const arma\+::mat \&}]{transition,  }\item[{const std\+::vector$<$ Distribution $>$ \&}]{emission,  }\item[{const double}]{tolerance = {\ttfamily 1e-\/5} }\end{DoxyParamCaption})}



Create the Hidden Markov Model with the given initial probability vector, the given transition matrix, and the given emission distributions. 

The dimensionality of the observations of the \doxyref{H\+MM}{p.}{classmlpack_1_1hmm_1_1HMM} are taken from the given emission distributions. Alternately, the dimensionality can be set with \doxyref{Dimensionality()}{p.}{classmlpack_1_1hmm_1_1HMM_a787adc650f11b9430f6bd0b937bbe6b0}.

The initial state probability vector should have length equal to the number of states, and each entry represents the probability of being in the given state at time T = 0 (the beginning of a sequence).

The transition matrix should be such that T(i, j) is the probability of transition to state i from state j. The columns of the matrix should sum to 1.

The emission matrix should be such that E(i, j) is the probability of emission i while in state j. The columns of the matrix should sum to 1.

Optionally, the tolerance for convergence of the Baum-\/\+Welch algorithm can be set.


\begin{DoxyParams}{Parameters}
{\em initial} & Initial state probabilities. \\
\hline
{\em transition} & Transition matrix. \\
\hline
{\em emission} & Emission distributions. \\
\hline
{\em tolerance} & Tolerance for convergence of training algorithm (Baum-\/\+Welch). \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1hmm_1_1HMM_a2d4eaeae59f2caf4a60007ca0aeb1b12}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!Backward@{Backward}}
\index{Backward@{Backward}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{Backward()}
{\footnotesize\ttfamily void Backward (\begin{DoxyParamCaption}\item[{const arma\+::mat \&}]{data\+Seq,  }\item[{const arma\+::vec \&}]{log\+Scales,  }\item[{arma\+::mat \&}]{backward\+Log\+Prob }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [protected]}}



The Backward algorithm (part of the Forward-\/\+Backward algorithm). 

Computes backward probabilities for each state for each observation in the given data sequence, using the scaling factors found (presumably) by \doxyref{Forward()}{p.}{classmlpack_1_1hmm_1_1HMM_aad5193e493b72726cf4f1dc98edc8351}. The returned matrix has rows equal to the number of hidden states and columns equal to the number of observations.


\begin{DoxyParams}{Parameters}
{\em data\+Seq} & Data sequence to compute probabilities for. \\
\hline
{\em log\+Scales} & Vector of scaling factors. \\
\hline
{\em backward\+Log\+Prob} & Matrix in which backward probabilities will be saved. \\
\hline
\end{DoxyParams}


Referenced by H\+M\+M$<$ mlpack\+::distribution\+::\+Discrete\+Distribution $>$\+::\+Tolerance().

\mbox{\label{classmlpack_1_1hmm_1_1HMM_aaa7d7fea7b07c673fb1a3a0983eb0722}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!B\+O\+O\+S\+T\+\_\+\+S\+E\+R\+I\+A\+L\+I\+Z\+A\+T\+I\+O\+N\+\_\+\+S\+P\+L\+I\+T\+\_\+\+M\+E\+M\+B\+ER@{B\+O\+O\+S\+T\+\_\+\+S\+E\+R\+I\+A\+L\+I\+Z\+A\+T\+I\+O\+N\+\_\+\+S\+P\+L\+I\+T\+\_\+\+M\+E\+M\+B\+ER}}
\index{B\+O\+O\+S\+T\+\_\+\+S\+E\+R\+I\+A\+L\+I\+Z\+A\+T\+I\+O\+N\+\_\+\+S\+P\+L\+I\+T\+\_\+\+M\+E\+M\+B\+ER@{B\+O\+O\+S\+T\+\_\+\+S\+E\+R\+I\+A\+L\+I\+Z\+A\+T\+I\+O\+N\+\_\+\+S\+P\+L\+I\+T\+\_\+\+M\+E\+M\+B\+ER}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{B\+O\+O\+S\+T\+\_\+\+S\+E\+R\+I\+A\+L\+I\+Z\+A\+T\+I\+O\+N\+\_\+\+S\+P\+L\+I\+T\+\_\+\+M\+E\+M\+B\+E\+R()}
{\footnotesize\ttfamily B\+O\+O\+S\+T\+\_\+\+S\+E\+R\+I\+A\+L\+I\+Z\+A\+T\+I\+O\+N\+\_\+\+S\+P\+L\+I\+T\+\_\+\+M\+E\+M\+B\+ER (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Referenced by H\+M\+M$<$ mlpack\+::distribution\+::\+Discrete\+Distribution $>$\+::\+Tolerance().

\mbox{\label{classmlpack_1_1hmm_1_1HMM_a78eda6bfb9e9462afa0fc85e32abe1af}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!Dimensionality@{Dimensionality}}
\index{Dimensionality@{Dimensionality}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{Dimensionality()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily size\+\_\+t Dimensionality (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the dimensionality of observations. 



Definition at line 347 of file hmm.\+hpp.

\mbox{\label{classmlpack_1_1hmm_1_1HMM_a787adc650f11b9430f6bd0b937bbe6b0}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!Dimensionality@{Dimensionality}}
\index{Dimensionality@{Dimensionality}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{Dimensionality()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily size\+\_\+t\& Dimensionality (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Set the dimensionality of observations. 



Definition at line 349 of file hmm.\+hpp.

\mbox{\label{classmlpack_1_1hmm_1_1HMM_ae0939befd9369e7605f50a8f5489cebd}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!Emission@{Emission}}
\index{Emission@{Emission}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{Emission()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily const std\+::vector$<$Distribution$>$\& Emission (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Return the emission distributions. 



Definition at line 342 of file hmm.\+hpp.

\mbox{\label{classmlpack_1_1hmm_1_1HMM_ace6dae9e34d19c372294bef69e317f27}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!Emission@{Emission}}
\index{Emission@{Emission}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{Emission()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily std\+::vector$<$Distribution$>$\& Emission (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Return a modifiable emission probability matrix reference. 



Definition at line 344 of file hmm.\+hpp.

\mbox{\label{classmlpack_1_1hmm_1_1HMM_a73a4437336c8af18d51958a6abdd588d}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!Estimate@{Estimate}}
\index{Estimate@{Estimate}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{Estimate()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily double Estimate (\begin{DoxyParamCaption}\item[{const arma\+::mat \&}]{data\+Seq,  }\item[{arma\+::mat \&}]{state\+Prob,  }\item[{arma\+::mat \&}]{forward\+Prob,  }\item[{arma\+::mat \&}]{backward\+Prob,  }\item[{arma\+::vec \&}]{scales }\end{DoxyParamCaption}) const}



Estimate the probabilities of each hidden state at each time step for each given data observation, using the Forward-\/\+Backward algorithm. 

Each matrix which is returned has columns equal to the number of data observations, and rows equal to the number of hidden states in the model. The log-\/likelihood of the most probable sequence is returned.


\begin{DoxyParams}{Parameters}
{\em data\+Seq} & Sequence of observations. \\
\hline
{\em state\+Prob} & Matrix in which the probabilities of each state at each time interval will be stored. \\
\hline
{\em forward\+Prob} & Matrix in which the forward probabilities of each state at each time interval will be stored. \\
\hline
{\em backward\+Prob} & Matrix in which the backward probabilities of each state at each time interval will be stored. \\
\hline
{\em scales} & Vector in which the scaling factors at each time interval will be stored. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Log-\/likelihood of most likely state sequence. 
\end{DoxyReturn}
\mbox{\label{classmlpack_1_1hmm_1_1HMM_aba5d63e40a43faa5a2999bd47bed6c9f}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!Estimate@{Estimate}}
\index{Estimate@{Estimate}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{Estimate()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily double Estimate (\begin{DoxyParamCaption}\item[{const arma\+::mat \&}]{data\+Seq,  }\item[{arma\+::mat \&}]{state\+Prob }\end{DoxyParamCaption}) const}



Estimate the probabilities of each hidden state at each time step of each given data observation, using the Forward-\/\+Backward algorithm. 

The returned matrix of state probabilities has columns equal to the number of data observations, and rows equal to the number of hidden states in the model. The log-\/likelihood of the most probable sequence is returned.


\begin{DoxyParams}{Parameters}
{\em data\+Seq} & Sequence of observations. \\
\hline
{\em state\+Prob} & Probabilities of each state at each time interval. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Log-\/likelihood of most likely state sequence. 
\end{DoxyReturn}
\mbox{\label{classmlpack_1_1hmm_1_1HMM_ab197c1fe906f9f2c81d7c0c8f1bb430a}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!Filter@{Filter}}
\index{Filter@{Filter}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{Filter()}
{\footnotesize\ttfamily void Filter (\begin{DoxyParamCaption}\item[{const arma\+::mat \&}]{data\+Seq,  }\item[{arma\+::mat \&}]{filter\+Seq,  }\item[{size\+\_\+t}]{ahead = {\ttfamily 0} }\end{DoxyParamCaption}) const}



\doxyref{H\+MM}{p.}{classmlpack_1_1hmm_1_1HMM} filtering. 

Computes the k-\/step-\/ahead expected emission at each time conditioned only on prior observations. That is E\{ Y[t+k] $\vert$ Y[0], ..., Y[t] \}. The returned matrix has columns equal to the number of observations. Note that the expectation may not be meaningful for discrete emissions.


\begin{DoxyParams}{Parameters}
{\em data\+Seq} & Sequence of observations. \\
\hline
{\em filter\+Seq} & Vector in which the expected emission sequence will be stored. \\
\hline
{\em ahead} & Number of steps ahead (k) for expectations. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1hmm_1_1HMM_aad5193e493b72726cf4f1dc98edc8351}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!Forward@{Forward}}
\index{Forward@{Forward}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{Forward()}
{\footnotesize\ttfamily void Forward (\begin{DoxyParamCaption}\item[{const arma\+::mat \&}]{data\+Seq,  }\item[{arma\+::vec \&}]{log\+Scales,  }\item[{arma\+::mat \&}]{forward\+Log\+Prob }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [protected]}}



The Forward algorithm (part of the Forward-\/\+Backward algorithm). 

Computes forward probabilities for each state for each observation in the given data sequence. The returned matrix has rows equal to the number of hidden states and columns equal to the number of observations.


\begin{DoxyParams}{Parameters}
{\em data\+Seq} & Data sequence to compute probabilities for. \\
\hline
{\em log\+Scales} & Vector in which scaling factors will be saved. \\
\hline
{\em forward\+Log\+Prob} & Matrix in which forward probabilities will be saved. \\
\hline
\end{DoxyParams}


Referenced by H\+M\+M$<$ mlpack\+::distribution\+::\+Discrete\+Distribution $>$\+::\+Tolerance().

\mbox{\label{classmlpack_1_1hmm_1_1HMM_aaada1e3c4a467d13ded6cfbb0d332898}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!Generate@{Generate}}
\index{Generate@{Generate}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{Generate()}
{\footnotesize\ttfamily void Generate (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{length,  }\item[{arma\+::mat \&}]{data\+Sequence,  }\item[{arma\+::\+Row$<$ size\+\_\+t $>$ \&}]{state\+Sequence,  }\item[{const size\+\_\+t}]{start\+State = {\ttfamily 0} }\end{DoxyParamCaption}) const}



Generate a random data sequence of the given length. 

The data sequence is stored in the data\+Sequence parameter, and the state sequence is stored in the state\+Sequence parameter. Each column of data\+Sequence represents a random observation.


\begin{DoxyParams}{Parameters}
{\em length} & Length of random sequence to generate. \\
\hline
{\em data\+Sequence} & Vector to store data in. \\
\hline
{\em state\+Sequence} & Vector to store states in. \\
\hline
{\em start\+State} & Hidden state to start sequence in (default 0). \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1hmm_1_1HMM_a4c983e4a77757824d9ca4e1ada75dcf5}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!Initial@{Initial}}
\index{Initial@{Initial}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{Initial()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily const arma\+::vec\& Initial (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Return the vector of initial state probabilities. 



Definition at line 324 of file hmm.\+hpp.

\mbox{\label{classmlpack_1_1hmm_1_1HMM_ad0b8d2c553f50a26456393e194358df8}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!Initial@{Initial}}
\index{Initial@{Initial}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{Initial()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily arma\+::vec\& Initial (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the vector of initial state probabilities. 



Definition at line 326 of file hmm.\+hpp.

\mbox{\label{classmlpack_1_1hmm_1_1HMM_a68dbd347886624cd725b8a26e5242ee2}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!load@{load}}
\index{load@{load}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{load()}
{\footnotesize\ttfamily void load (\begin{DoxyParamCaption}\item[{Archive \&}]{ar,  }\item[{const unsigned int}]{version }\end{DoxyParamCaption})}



Load the object. 



Referenced by H\+M\+M$<$ mlpack\+::distribution\+::\+Discrete\+Distribution $>$\+::\+Tolerance().

\mbox{\label{classmlpack_1_1hmm_1_1HMM_af1f16adb7b69040e9bc7711ca1fa1fe8}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!Log\+Estimate@{Log\+Estimate}}
\index{Log\+Estimate@{Log\+Estimate}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{Log\+Estimate()}
{\footnotesize\ttfamily double Log\+Estimate (\begin{DoxyParamCaption}\item[{const arma\+::mat \&}]{data\+Seq,  }\item[{arma\+::mat \&}]{state\+Log\+Prob,  }\item[{arma\+::mat \&}]{forward\+Log\+Prob,  }\item[{arma\+::mat \&}]{backward\+Log\+Prob,  }\item[{arma\+::vec \&}]{log\+Scales }\end{DoxyParamCaption}) const}



Estimate the probabilities of each hidden state at each time step for each given data observation, using the Forward-\/\+Backward algorithm. 

Each matrix which is returned has columns equal to the number of data observations, and rows equal to the number of hidden states in the model. The log-\/likelihood of the most probable sequence is returned.


\begin{DoxyParams}{Parameters}
{\em data\+Seq} & Sequence of observations. \\
\hline
{\em state\+Log\+Prob} & Matrix in which the log probabilities of each state at each time interval will be stored. \\
\hline
{\em forward\+Log\+Prob} & Matrix in which the forward log probabilities of each state at each time interval will be stored. \\
\hline
{\em backward\+Log\+Prob} & Matrix in which the backward log probabilities of each state at each time interval will be stored. \\
\hline
{\em log\+Scales} & Vector in which the log of scaling factors at each time interval will be stored. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Log-\/likelihood of most likely state sequence. 
\end{DoxyReturn}
\mbox{\label{classmlpack_1_1hmm_1_1HMM_aa8f3f0b515cc08f9476e435bb2d13210}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!Log\+Likelihood@{Log\+Likelihood}}
\index{Log\+Likelihood@{Log\+Likelihood}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{Log\+Likelihood()}
{\footnotesize\ttfamily double Log\+Likelihood (\begin{DoxyParamCaption}\item[{const arma\+::mat \&}]{data\+Seq }\end{DoxyParamCaption}) const}



Compute the log-\/likelihood of the given data sequence. 


\begin{DoxyParams}{Parameters}
{\em data\+Seq} & Data sequence to evaluate the likelihood of. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Log-\/likelihood of the given sequence. 
\end{DoxyReturn}
\mbox{\label{classmlpack_1_1hmm_1_1HMM_a3b7ef0aafafd5d5a4300c07b110807a4}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!Predict@{Predict}}
\index{Predict@{Predict}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{Predict()}
{\footnotesize\ttfamily double Predict (\begin{DoxyParamCaption}\item[{const arma\+::mat \&}]{data\+Seq,  }\item[{arma\+::\+Row$<$ size\+\_\+t $>$ \&}]{state\+Seq }\end{DoxyParamCaption}) const}



Compute the most probable hidden state sequence for the given data sequence, using the Viterbi algorithm, returning the log-\/likelihood of the most likely state sequence. 


\begin{DoxyParams}{Parameters}
{\em data\+Seq} & Sequence of observations. \\
\hline
{\em state\+Seq} & Vector in which the most probable state sequence will be stored. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Log-\/likelihood of most probable state sequence. 
\end{DoxyReturn}
\mbox{\label{classmlpack_1_1hmm_1_1HMM_a5888613434d5f36b8bd71f54206d7c8b}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!save@{save}}
\index{save@{save}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{save()}
{\footnotesize\ttfamily void save (\begin{DoxyParamCaption}\item[{Archive \&}]{ar,  }\item[{const unsigned int}]{version }\end{DoxyParamCaption}) const}



Save the object. 



Referenced by H\+M\+M$<$ mlpack\+::distribution\+::\+Discrete\+Distribution $>$\+::\+Tolerance().

\mbox{\label{classmlpack_1_1hmm_1_1HMM_a0139a3d883c28d6f45e15097c08bbf41}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!Smooth@{Smooth}}
\index{Smooth@{Smooth}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{Smooth()}
{\footnotesize\ttfamily void Smooth (\begin{DoxyParamCaption}\item[{const arma\+::mat \&}]{data\+Seq,  }\item[{arma\+::mat \&}]{smooth\+Seq }\end{DoxyParamCaption}) const}



\doxyref{H\+MM}{p.}{classmlpack_1_1hmm_1_1HMM} smoothing. 

Computes expected emission at each time conditioned on all observations. That is E\{ Y[t] $\vert$ Y[0], ..., Y[T] \}. The returned matrix has columns equal to the number of observations. Note that the expectation may not be meaningful for discrete emissions.


\begin{DoxyParams}{Parameters}
{\em data\+Seq} & Sequence of observations. \\
\hline
{\em smooth\+Seq} & Vector in which the expected emission sequence will be stored. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1hmm_1_1HMM_a7b5af5c1a84c507cbaa7f999ea5a4fda}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!Tolerance@{Tolerance}}
\index{Tolerance@{Tolerance}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{Tolerance()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily double Tolerance (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the tolerance of the Baum-\/\+Welch algorithm. 



Definition at line 352 of file hmm.\+hpp.

\mbox{\label{classmlpack_1_1hmm_1_1HMM_a3d9fac84af16250f5a3689692e8f2173}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!Tolerance@{Tolerance}}
\index{Tolerance@{Tolerance}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{Tolerance()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily double\& Tolerance (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the tolerance of the Baum-\/\+Welch algorithm. 



Definition at line 354 of file hmm.\+hpp.

\mbox{\label{classmlpack_1_1hmm_1_1HMM_a0b3a1148721ee3e77bad0b987ca3973d}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!Train@{Train}}
\index{Train@{Train}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{Train()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily double Train (\begin{DoxyParamCaption}\item[{const std\+::vector$<$ arma\+::mat $>$ \&}]{data\+Seq }\end{DoxyParamCaption})}



Train the model using the Baum-\/\+Welch algorithm, with only the given unlabeled observations. 

Instead of giving a guess transition and emission matrix here, do that in the constructor. Each matrix in the vector of data sequences holds an individual data sequence; each point in each individual data sequence should be a column in the matrix. The number of rows in each matrix should be equal to the dimensionality of the \doxyref{H\+MM}{p.}{classmlpack_1_1hmm_1_1HMM} (which is set in the constructor).

It is preferable to use the other overload of \doxyref{Train()}{p.}{classmlpack_1_1hmm_1_1HMM_a0b3a1148721ee3e77bad0b987ca3973d}, with labeled data. That will produce much better results. However, if labeled data is unavailable, this will work. In addition, it is possible to use \doxyref{Train()}{p.}{classmlpack_1_1hmm_1_1HMM_a0b3a1148721ee3e77bad0b987ca3973d} with labeled data first, and then continue to train the model using this overload of \doxyref{Train()}{p.}{classmlpack_1_1hmm_1_1HMM_a0b3a1148721ee3e77bad0b987ca3973d} with unlabeled data.

The tolerance of the Baum-\/\+Welch algorithm can be set either in the constructor or with the \doxyref{Tolerance()}{p.}{classmlpack_1_1hmm_1_1HMM_a3d9fac84af16250f5a3689692e8f2173} method. When the change in log-\/likelihood of the model between iterations is less than the tolerance, the Baum-\/\+Welch algorithm terminates.

\begin{DoxyNote}{Note}
\doxyref{Train()}{p.}{classmlpack_1_1hmm_1_1HMM_a0b3a1148721ee3e77bad0b987ca3973d} can be called multiple times with different sequences; each time it is called, it uses the current parameters of the \doxyref{H\+MM}{p.}{classmlpack_1_1hmm_1_1HMM} as a starting point for training.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em data\+Seq} & Vector of observation sequences. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Log-\/likelihood of state sequence. 
\end{DoxyReturn}
\mbox{\label{classmlpack_1_1hmm_1_1HMM_a2cacf650f3d30e9da07be7a0aa2ded81}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!Train@{Train}}
\index{Train@{Train}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{Train()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily void Train (\begin{DoxyParamCaption}\item[{const std\+::vector$<$ arma\+::mat $>$ \&}]{data\+Seq,  }\item[{const std\+::vector$<$ arma\+::\+Row$<$ size\+\_\+t $>$ $>$ \&}]{state\+Seq }\end{DoxyParamCaption})}



Train the model using the given labeled observations; the transition and emission matrices are directly estimated. 

Each matrix in the vector of data sequences corresponds to a vector in the vector of state sequences. Each point in each individual data sequence should be a column in the matrix, and its state should be the corresponding element in the state sequence vector. For instance, data\+Seq[0].col(3) corresponds to the fourth observation in the first data sequence, and its state is state\+Seq[0][3]. The number of rows in each matrix should be equal to the dimensionality of the \doxyref{H\+MM}{p.}{classmlpack_1_1hmm_1_1HMM} (which is set in the constructor).

\begin{DoxyNote}{Note}
\doxyref{Train()}{p.}{classmlpack_1_1hmm_1_1HMM_a0b3a1148721ee3e77bad0b987ca3973d} can be called multiple times with different sequences; each time it is called, it uses the current parameters of the \doxyref{H\+MM}{p.}{classmlpack_1_1hmm_1_1HMM} as a starting point for training.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em data\+Seq} & Vector of observation sequences. \\
\hline
{\em state\+Seq} & Vector of state sequences, corresponding to each observation. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1hmm_1_1HMM_a103b830306d8c8d66a753f63e84ba5de}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!Transition@{Transition}}
\index{Transition@{Transition}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{Transition()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily const arma\+::mat\& Transition (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Return the transition matrix. 



Definition at line 333 of file hmm.\+hpp.

\mbox{\label{classmlpack_1_1hmm_1_1HMM_a08c5d391f5ea34e09497663673c5a16a}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!Transition@{Transition}}
\index{Transition@{Transition}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{Transition()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily arma\+::mat\& Transition (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Return a modifiable transition matrix reference. 



Definition at line 335 of file hmm.\+hpp.



\subsection{Member Data Documentation}
\mbox{\label{classmlpack_1_1hmm_1_1HMM_aa9f403ff2a03db91a1614d9e32c21783}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!emission@{emission}}
\index{emission@{emission}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{emission}
{\footnotesize\ttfamily std\+::vector$<$Distribution$>$ emission\hspace{0.3cm}{\ttfamily [protected]}}



Set of emission probability distributions; one for each state. 



Definition at line 403 of file hmm.\+hpp.



Referenced by H\+M\+M$<$ mlpack\+::distribution\+::\+Discrete\+Distribution $>$\+::\+Emission().

\mbox{\label{classmlpack_1_1hmm_1_1HMM_a46e0ed8f87152b5819d73057a19524fd}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!log\+Transition@{log\+Transition}}
\index{log\+Transition@{log\+Transition}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{log\+Transition}
{\footnotesize\ttfamily arma\+::mat log\+Transition\hspace{0.3cm}{\ttfamily [mutable]}, {\ttfamily [protected]}}



Transition probability matrix. No need to be mutable in mlpack 4.\+0. 



Definition at line 412 of file hmm.\+hpp.

\mbox{\label{classmlpack_1_1hmm_1_1HMM_a8ccc277a880972d6b9f7738f9cea5457}} 
\index{mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}!transition\+Proxy@{transition\+Proxy}}
\index{transition\+Proxy@{transition\+Proxy}!mlpack\+::hmm\+::\+H\+MM@{mlpack\+::hmm\+::\+H\+MM}}
\subsubsection{transition\+Proxy}
{\footnotesize\ttfamily arma\+::mat transition\+Proxy\hspace{0.3cm}{\ttfamily [protected]}}



A proxy variable in linear space for log\+Transition. 

Should be removed in mlpack 4.\+0. 

Definition at line 409 of file hmm.\+hpp.



Referenced by H\+M\+M$<$ mlpack\+::distribution\+::\+Discrete\+Distribution $>$\+::\+Transition().



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/hmm/\textbf{ hmm.\+hpp}\end{DoxyCompactItemize}
