#LyX 2.3 created this file. For more info see http://www.lyx.org/ \lyxformat 544 \begin_document \begin_header \save_transient_properties true \origin unavailable \textclass article \begin_preamble \def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]} \let\endchangemargin=\endlist \pagenumbering{roman} \usepackage{color} \definecolor{commentgreen}{RGB}{0,94,11} \definecolor{darkblue}{rgb}{0,0,0.75} \definecolor{darkred}{rgb}{0.6,0,0} \end_preamble \use_default_options true \begin_modules customHeadersFooters minimalistic todonotes figs-within-sections \end_modules \maintain_unincluded_children false \language english \language_package default \inputencoding auto \fontencoding global \font_roman "default" "default" \font_sans "default" "default" \font_typewriter "default" "default" \font_math "auto" "auto" \font_default_family default \use_non_tex_fonts false \font_sc false \font_osf false \font_sf_scale 100 100 \font_tt_scale 100 100 \use_microtype true \use_dash_ligatures true \graphics default \default_output_format default \output_sync 0 \bibtex_command biber \index_command default \paperfontsize default \spacing onehalf \use_hyperref true \pdf_title "Hidden Markov Models" \pdf_author "Andy Pack" \pdf_subject "EEEM030" \pdf_keywords "EEEM030" \pdf_bookmarks true \pdf_bookmarksnumbered false \pdf_bookmarksopen false \pdf_bookmarksopenlevel 1 \pdf_breaklinks false \pdf_pdfborder true \pdf_colorlinks false \pdf_backref false \pdf_pdfusetitle true \papersize default \use_geometry true \use_package amsmath 1 \use_package amssymb 1 \use_package cancel 1 \use_package esint 1 \use_package mathdots 1 \use_package mathtools 1 \use_package mhchem 1 \use_package stackrel 1 \use_package stmaryrd 1 \use_package undertilde 1 \cite_engine biblatex \cite_engine_type authoryear \biblio_style plain \biblio_options urldate=long \biblatex_bibstyle ieee \biblatex_citestyle ieee \use_bibtopic false \use_indices false \paperorientation portrait \suppress_date true \justification true \use_refstyle 1 \use_minted 0 \index Index \shortcut idx \color #008000 \end_index \leftmargin 1.8cm \topmargin 2cm \rightmargin 1.8cm \bottommargin 2cm \secnumdepth 3 \tocdepth 3 \paragraph_separation skip \defskip medskip \is_math_indent 0 \math_numbering_side default \quotes_style english \dynamic_quotes 0 \papercolumns 1 \papersides 1 \paperpagestyle fancy \listings_params "language=Python,breaklines=true,frame=tb,otherkeywords={self},emph={State},emphstyle={\ttb\color{darkred}},basicstyle={\ttfamily},commentstyle={\color{commentgreen}\itshape},keywordstyle={\color{darkblue}},emphstyle={\color{red}},stringstyle={\color{red}}" \bullet 1 0 9 -1 \bullet 2 0 24 -1 \tracking_changes false \output_changes false \html_math_output 0 \html_css_as_file 0 \html_be_strict false \end_header \begin_body \begin_layout Title \size giant Hidden Markov Model Analysis \end_layout \begin_layout Author Andy Pack \end_layout \begin_layout Standard \begin_inset VSpace 15pheight% \end_inset \end_layout \begin_layout Standard \align center \begin_inset Graphics filename surrey.png lyxscale 15 width 40col% \end_inset \end_layout \begin_layout Standard \begin_inset VSpace vfill \end_inset \end_layout \begin_layout Standard \noindent \align center EEEM030 \begin_inset Newline newline \end_inset January 2021 \size large \begin_inset Newline newline \end_inset Department of Electrical and Electronic Engineering \begin_inset Newline newline \end_inset Faculty of Engineering and Physical Sciences \begin_inset Newline newline \end_inset University of Surrey \end_layout \begin_layout Standard \begin_inset Newpage newpage \end_inset \end_layout \begin_layout Abstract abstract \end_layout \begin_layout Standard \begin_inset CommandInset toc LatexCommand tableofcontents \end_inset \end_layout \begin_layout Standard \begin_inset Newpage pagebreak \end_inset \end_layout \begin_layout Standard \begin_inset FloatList figure \end_inset \begin_inset CommandInset toc LatexCommand lstlistoflistings \end_inset \end_layout \begin_layout Standard \begin_inset Newpage newpage \end_inset \end_layout \begin_layout Right Footer Andy Pack / 6420013 \end_layout \begin_layout Left Footer January 2021 \end_layout \begin_layout Standard \begin_inset ERT status open \begin_layout Plain Layout \backslash pagenumbering{arabic} \end_layout \begin_layout Plain Layout \backslash setcounter{page}{1} \end_layout \end_inset \end_layout \begin_layout Section Introduction \end_layout \begin_layout Standard The Markov model is a stochastic model for analysing random processes. The model describes a system of multiple states and the transitions between them; a key feature is the \emph on Markov property \emph default which states that the future state of the system depends only on the current state \begin_inset CommandInset citation LatexCommand cite key "towards-data-science-markov-intro" literal "false" \end_inset . This is also described as the system being \emph on memoryless \emph default . \end_layout \begin_layout Standard \begin_inset Flex TODO Note (inline) status open \begin_layout Plain Layout Described markov chains \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset Flex TODO Note (inline) status open \begin_layout Plain Layout Difference with hidden markov models \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset Flex TODO Note (inline) status open \begin_layout Plain Layout Application to machine learning and speech in particular \end_layout \end_inset \end_layout \begin_layout Subsection Brief \end_layout \begin_layout Standard This work analyses a continuous-density hidden Markov model of 2 emitting states describing a 1D observation space. Various statistics and calculations will be conducted on the model including forward, backward, occupation and transition likelihoods. Using these, an iteration of training will be completed using the Baum-Welch equations resulting in a new set of transition probabilities and re-estimated output probabilities. \end_layout \begin_layout Standard The model is specified as follows; the transition probabilities are described by entry ( \begin_inset Formula $\pi$ \end_inset ) and exit ( \begin_inset Formula $\eta$ \end_inset ) probabilities for each state along with a matrix of state-to-state transitions ( \begin_inset Formula $a$ \end_inset ), \end_layout \begin_layout Standard \begin_inset Formula \[ A=\left\{ \pi_{j},a_{ij},\eta_{i}\right\} \] \end_inset \end_layout \begin_layout Standard \begin_inset Formula \[ \pi_{j}=\left\{ 0.44,0.56\right\} \] \end_inset \end_layout \begin_layout Standard \begin_inset Formula \[ a_{ij}=\left[\begin{array}{cc} 0.92 & 0.06\\ 0.04 & 0.93 \end{array}\right] \] \end_inset \end_layout \begin_layout Standard \begin_inset Formula \[ \eta_{i}=\left\{ 0.02,0.03\right\} \] \end_inset \end_layout \begin_layout Standard These, in combination, describe a state topology than can be seen graphically in figure \begin_inset CommandInset ref LatexCommand ref reference "fig:State-topology" plural "false" caps "false" noprefix "false" \end_inset . \end_layout \begin_layout Standard As previously mentioned, the states are described 1D continuous probability density functions (PDF) of a Gaussian profile. Each has an associated mean and variance as seen below, \end_layout \begin_layout Standard \noindent \align center \begin_inset Tabular \begin_inset Text \begin_layout Plain Layout State, \begin_inset Formula $i$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 1 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 2 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout Mean, \begin_inset Formula $\mu_{i}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 1.00 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 4.00 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout Variance, \begin_inset Formula $\varSigma_{i}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 1.44 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.49 \end_layout \end_inset \end_inset \end_layout \begin_layout Standard Finally, a set of observations from the above model are provided below, \end_layout \begin_layout Standard \noindent \align center \begin_inset Formula \[ \mathcal{O}=\left\{ 3.8,4.2,3.4,-0.4,1.9,3.0,1.6,1.9,5.0\right\} \] \end_inset \end_layout \begin_layout Standard These are used as the basis for training the model using the Baum-Welch equations. \end_layout \begin_layout Section Implementation \end_layout \begin_layout Standard \begin_inset Float figure wide false sideways false status open \begin_layout Plain Layout \noindent \align center \begin_inset Graphics filename StateTopology.png lyxscale 50 width 65col% \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption Standard \begin_layout Plain Layout State topology for the specified Markov Model \begin_inset CommandInset label LatexCommand label name "fig:State-topology" \end_inset \end_layout \end_inset \end_layout \begin_layout Plain Layout \end_layout \end_inset \end_layout \begin_layout Section Results \end_layout \begin_layout Subsection Output Probability Density Functions \end_layout \begin_layout Standard \begin_inset Float figure wide false sideways false status open \begin_layout Plain Layout \noindent \align center \begin_inset Graphics filename res/pdfs.png width 50col% \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption Standard \begin_layout Plain Layout Probability density functions for both states across the observation space \begin_inset CommandInset label LatexCommand label name "fig:PDFs" \end_inset \end_layout \end_inset \end_layout \begin_layout Plain Layout \end_layout \end_inset \end_layout \begin_layout Subsection Observation Probability Densities \end_layout \begin_layout Standard \begin_inset Float table wide false sideways false status open \begin_layout Plain Layout \noindent \align center \begin_inset Tabular \begin_inset Text \begin_layout Plain Layout t \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $o_{t}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $b_{i}\left(o_{t}\right)$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $i=1$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $i=2$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 1 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 3.8 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.022 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.55 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 2 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 4.2 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.0095 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.55 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 3 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 3.4 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.045 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.39 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 4 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout -0.4 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.17 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 1.5 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 5 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 1.9 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.25 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.0063 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 6 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 3.0 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.083 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.21 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 7 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 1.6 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.29 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.0016 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 8 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 1.9 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.25 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.0063 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 9 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 5.0 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.0013 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.21 \end_layout \end_inset \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption Standard \begin_layout Plain Layout Probability densities for each observation from each state to (2 s.f) \begin_inset CommandInset label LatexCommand label name "tab:obs-prob-dens" \end_inset \end_layout \end_inset \end_layout \begin_layout Plain Layout \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset Float figure wide false sideways false status open \begin_layout Plain Layout \noindent \align center \begin_inset Graphics filename res/pdfs-w-obs.png width 50col% \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption Standard \begin_layout Plain Layout Previous PDFs (figure \begin_inset CommandInset ref LatexCommand ref reference "fig:PDFs" plural "false" caps "false" noprefix "false" \end_inset ) with observations highlighted \begin_inset CommandInset label LatexCommand label name "fig:PDFs-w-obs" \end_inset \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Subsection Forward Procedure and Likelihoods \end_layout \begin_layout Standard \begin_inset Float table wide false sideways false status open \begin_layout Plain Layout \noindent \align center \begin_inset Tabular \begin_inset Text \begin_layout Plain Layout t \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $\alpha_{t}\left(i\right)$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $i=1$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $i=2$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 1 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $9.61\times10^{-3}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.306 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 2 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $2.00\times10^{-4}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.156 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 3 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $2.89\times10^{-4}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.0573 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 4 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $4.31\times10^{-4}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $8.01\times10^{-11}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 5 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $9.95\times10^{-5}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $1.64\times10^{-7}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 6 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $7.59\times10^{-6}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $1.26\times10^{-6}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 7 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $2.06\times10^{-6}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $2.59\times10^{-9}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 8 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $4.76\times10^{-7}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $7.99\times10^{-10}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 9 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $5.63\times10^{-10}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $6.02\times10^{-9}$ \end_inset \end_layout \end_inset \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption Standard \begin_layout Plain Layout Forward likelihoods for each state at each time step \begin_inset CommandInset label LatexCommand label name "tab:Forward-likelihoods" \end_inset \end_layout \end_inset \end_layout \begin_layout Plain Layout \end_layout \end_inset \end_layout \begin_layout Subsection Backward Procedure and Likelihoods \end_layout \begin_layout Standard \begin_inset Float table wide false sideways false status open \begin_layout Plain Layout \noindent \align center \begin_inset Tabular \begin_inset Text \begin_layout Plain Layout t \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $\beta_{t}\left(i\right)$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $i=1$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $i=2$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 1 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $6.58\times10^{-11}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $6.25\times10^{-10}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 2 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $2.93\times10^{-9}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $1.23\times10^{-9}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 3 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $6.90\times10^{-8}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $3.00\times10^{-9}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 4 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $4.45\times10^{-7}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $2.11\times10^{-8}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 5 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $1.93\times10^{-6}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $3.02\times10^{-7}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 6 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $2.51\times10^{-5}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $1.15\times10^{-6}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 7 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $9.30\times10^{-5}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $3.77\times10^{-5}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 8 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $3.93\times10^{-4}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $5.73\times10^{-3}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 9 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.02 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.03 \end_layout \end_inset \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption Standard \begin_layout Plain Layout Backward likelihoods for each state at each time step \begin_inset CommandInset label LatexCommand label name "tab:Backward-likelihoods" \end_inset \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Subsection Observations Likelihood \end_layout \begin_layout Subsection Occupation Likelihoods \end_layout \begin_layout Standard \begin_inset Float table wide false sideways false status open \begin_layout Plain Layout \noindent \align center \begin_inset Tabular \begin_inset Text \begin_layout Plain Layout t \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $\gamma_{t}\left(i\right)$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $i=1$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $i=2$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 1 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.003295 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.9967 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 2 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.003055 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.9969 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 3 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.1040 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.8960 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 4 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.9999... \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Formula $8.818\times10^{-9}$ \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 5 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.9997 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.0002579 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 6 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.9925 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.007517 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 7 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.9995 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.0005095 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 8 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.9761 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.02386 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 9 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.05868 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 0.9413 \end_layout \end_inset \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption Standard \begin_layout Plain Layout Occupation likelihoods for each state at each time step (4 s.f.) \begin_inset CommandInset label LatexCommand label name "tab:Occupation-likelihoods" \end_inset \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Subsection Baum-Welch Re-estimations \end_layout \begin_layout Subsubsection Output Parameters \end_layout \begin_layout Standard \begin_inset Float figure wide false sideways false status open \begin_layout Plain Layout \noindent \align center \begin_inset Graphics filename res/re-est-pdfs.png width 50col% \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption Standard \begin_layout Plain Layout Probability density functions following re-estimation of parameters \begin_inset CommandInset label LatexCommand label name "fig:Re-estimated-PDFs" \end_inset \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Subsubsection State Transitions \end_layout \begin_layout Section Discussion \end_layout \begin_layout Section Conclusion \end_layout \begin_layout Standard \begin_inset Newpage newpage \end_inset \end_layout \begin_layout Standard \begin_inset CommandInset label LatexCommand label name "sec:bibliography" \end_inset \begin_inset CommandInset bibtex LatexCommand bibtex btprint "btPrintCited" bibfiles "references" options "bibtotoc" \end_inset \end_layout \begin_layout Standard \begin_inset Newpage newpage \end_inset \end_layout \begin_layout Section \start_of_appendix Intermediate Results \end_layout \begin_layout Section Source Code \end_layout \begin_layout Standard \begin_inset CommandInset include LatexCommand lstinputlisting filename "../constants.py" lstparams "caption={Constants file defining initial state transition probabilities and PDF parameters},label={constants-listing}" \end_inset \end_layout \begin_layout Standard \begin_inset CommandInset include LatexCommand lstinputlisting filename "../maths.py" lstparams "caption={Maths utility file with definition for a gaussian},label={maths-listing}" \end_inset \end_layout \begin_layout Standard \begin_inset CommandInset include LatexCommand lstinputlisting filename "../markov.py" lstparams "caption={Markov model object defining forward and backward procedure, occupation likelihoods, Baum-Welch equations},label={markov-listing}" \end_inset \end_layout \begin_layout Standard \begin_inset CommandInset include LatexCommand lstinputlisting filename "../markovlog.py" lstparams "caption={Child Markov model re-implementing calculations using log probability and likelihood},label={log-markov-listing}" \end_inset \end_layout \begin_layout Standard \begin_inset Newpage newpage \end_inset \end_layout \begin_layout Standard The development of the model behind this report was completed using Jupyter Notebook. The used notebook can be seen formatted in plain text below, the relevant mark scheme elements are referenced in brackets. \end_layout \begin_layout Standard \begin_inset CommandInset include LatexCommand lstinputlisting filename "../notebook.py" lstparams "caption={Plain output of Jupyter Notebook used for development and debugging},label={notebook-listing}" \end_inset \end_layout \end_body \end_document