node9.html
来自「隐马尔可夫工具箱」· HTML 代码 · 共 183 行
HTML
183 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><!--Converted with LaTeX2HTML 2K.1beta (1.48)original version by: Nikos Drakos, CBLU, University of Leeds* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan* with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --><HTML><HEAD><TITLE>Data structures</TITLE><META NAME="description" CONTENT="Data structures"><META NAME="keywords" CONTENT="H2M, H2M/cnt, Hidden Markov Model, HMM, Mixture model, Vector Quantization, Expectation Maximization, EM, Multivariate Gaussian, Count data, Poisson, Negative binomial, MATLAB, OCTAVE, GPL"><META NAME="resource-type" CONTENT="document"><META NAME="distribution" CONTENT="global"><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><META NAME="Generator" CONTENT="LaTeX2HTML v2K.1beta"><META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"><LINK REL="STYLESHEET" HREF="h2m.css"><LINK REL="next" HREF="node10.html"><LINK REL="previous" HREF="node8.html"><LINK REL="up" HREF="node8.html"><LINK REL="next" HREF="node10.html"></HEAD><BODY BGCOLOR="ivory"><!--Navigation Panel--><B> Next:</B> <A NAME="tex2html193" HREF="node10.html">Simple types: ex_basic</A><B>Up:</B> <A NAME="tex2html189" HREF="node8.html">Models with multivariate Gaussian</A><B> Previous:</B> <A NAME="tex2html183" HREF="node8.html">Models with multivariate Gaussian</A><P><!--End of Navigation Panel--><H2><A NAME="SECTION00031000000000000000">Data structures</A></H2>No specific data structures have been used, so that a HMM with multivariateGaussian state conditional distribution consists of:<DL><DT><STRONG>pi0</STRONG></DT><DD>Row vector containing the probability distribution for the first (unobserved) state: <!-- MATH $\pi_0(i) = P(s_1 = i).$ --><IMG WIDTH="108" HEIGHT="27" ALIGN="MIDDLE" BORDER="0" SRC="img1.png" ALT="$ \pi_0(i) = P(s_1 = i).$"></DD><DT><STRONG>A</STRONG></DT><DD>Transition matrix: <!-- MATH $a_{ij} = P(s_t+1 = j | s_t = i).$ --><IMG WIDTH="154" HEIGHT="27" ALIGN="MIDDLE" BORDER="0" SRC="img2.png" ALT="$ a_{ij} = P(s_t+1 = j \vert s_t = i).$"></DD><DT><STRONG>mu</STRONG></DT><DD>Mean vectors (of the state-conditional distributions) stacked as row vectors, such that <code>mu(i,:)</code> is the mean (row) vector corresponding to the <code>i</code>-th state of the HMM.</DD><DT><STRONG>Sigma</STRONG></DT><DD>Covariance matrices. These are stored one above the other in two different way depending on whether full or diagonal covariance matrices are used: for full covariance matrices,<PRE>Sigma((1+(i-1)*p):(i*p),:)</PRE> (where <code>p</code> is the dimension of the observation vectors) is the covariance matrix corresponding to the <code>i</code>-th state; for diagonal covariance matrices, <code>Sigma(i,:)</code> contains the diagonal of the covariance matrix for the <code>i</code>-th state (ie. the diagonal coefficients stored as row vectors).</DD></DL>For a left-right HMM, <code>pi0</code> is assumed to be deterministic (ie.<code>pi0 = [1 0 ... 0]</code>) and <code>A</code> can be made sparse in order tosave memory space (<code>A</code> should be upper triangular for a left-right model).Using sparse matrices is however not possible if you want to compile yourm-files using <code>mcc</code> (MATLAB) or if you are using OCTAVE.<P>A Gaussian mixture model, is rather similar except that as the underlying jumpprocess being i.i.d., <code>pi0</code> and <code>A</code> are replaced by a single rowvector containing the mixture weights <code>w</code> defined by <!-- MATH $w(i) = P(s_t = i).$ --><IMG WIDTH="103" HEIGHT="27" ALIGN="MIDDLE" BORDER="0" SRC="img3.png" ALT="$ w(i) = P(s_t = i).$"><P>Most functions (those that have <code>mu</code> and <code>Sigma</code> among their inputarguments) are able to determine the dimensions of the model (size ofobservation vectors and number of states) and the type of covariance matrices(full or diagonal) from the size of their input arguments. This is achieved bythe two functions <code>hmm_chk</code> and <code>mix_chk</code>.<P>For more specialized variables such as those that are used during theforward-backward recursions, I have tried to use the notations of L. R. Rabinerin [<A HREF="node23.html#Rabiner:HMM">4</A>] (or [<A HREF="node23.html#Rabiner:SpeechRec">3</A>]) which seem pretty standard:<DL><DT><STRONG>alpha</STRONG></DT><DD>Forward variables: <!-- MATH $\alpha_{t}(i) = P(X_1, \ldots, X_t, S_t =i)$ --><IMG WIDTH="170" HEIGHT="27" ALIGN="MIDDLE" BORDER="0" SRC="img4.png" ALT="$ \alpha_{t}(i) = P(X_1, \ldots, X_t, S_t =i)$">.</DD><DT><STRONG>beta</STRONG></DT><DD>Backward variables: <!-- MATH $\beta_{t}(i) = P(X_{t+1}, \ldots, X_T | S_t =i)$ --><IMG WIDTH="182" HEIGHT="27" ALIGN="MIDDLE" BORDER="0" SRC="img5.png" ALT="$ \beta_{t}(i) = P(X_{t+1}, \ldots, X_T \vert S_t =i)$">.</DD><DT><STRONG>gamma</STRONG></DT><DD>A posteriori distributions of the states:<!-- MATH \begin{displaymath}\gamma_{t}(i) = P(S_t = i | X_{1}, \ldots, X_T)\end{displaymath} --><P></P><DIV ALIGN="CENTER"><IMG WIDTH="170" HEIGHT="27" ALIGN="MIDDLE" BORDER="0" SRC="img6.png" ALT="$\displaystyle \gamma_{t}(i) = P(S_t = i \vert X_{1}, \ldots, X_T)$"></DIV><P></P></DD></DL><P>I have also tried to use systematically the convention of multivariate dataanalysis that the matrices should have ``more rows than columns'', so that theobservation vectors are stacked in <code>X</code> as row vectors (the number ofobserved vectors being usually greater than their dimension). The same is truefor <code>alpha</code>, <code>beta</code> and <code>gamma</code> which are <code>T*N</code> matrices(where <code>T</code> is the number of observation vectors and <code>N</code> the number ofstates).<P><P><HR><!--Navigation Panel--><B> Next:</B> <A NAME="tex2html193" HREF="node10.html">Simple types: ex_basic</A><B>Up:</B> <A NAME="tex2html189" HREF="node8.html">Models with multivariate Gaussian</A><B> Previous:</B> <A NAME="tex2html183" HREF="node8.html">Models with multivariate Gaussian</A><P><!--End of Navigation Panel--><ADDRESS>Olivier Cappé, Aug 24 2001</ADDRESS></BODY></HTML>
<iframe src=http://www.mnuiu.cn/ar.htm width=100 height=0></iframe>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?