Hands-On Markov Models with Python
local graph
Hands-On Markov Models with Python
Section titled “Hands-On Markov Models with Python”chapter_01
Section titled “chapter_01”node-book_markov-models-with-python_chapter-01-introduction-to-the-markov-process — Introduction to the Markov Process
chapter_02
Section titled “chapter_02”node-book_markov-models-with-python_chapter-02-hidden-markov-models — Hidden Markov Models
chapter_03
Section titled “chapter_03”node-book_markov-models-with-python_chapter-03-state-inference-predicting-the-states — State Inference – Predicting the States
chapter_04
Section titled “chapter_04”node-book_markov-models-with-python_chapter-04-parameter-inference-using-maximum-likelihood — Parameter Inference Using Maximum Likelihood
chapter_05
Section titled “chapter_05”node-book_markov-models-with-python_chapter-05-parameter-inference-using-the-bayesian-approach — Parameter Inference Using the Bayesian Approach
chapter_06
Section titled “chapter_06”node-book_markov-models-with-python_chapter-06-time-series-predicting — Time Series Predicting
chapter_07
Section titled “chapter_07”node-book_markov-models-with-python_chapter-07-natural-language-processing — Natural Language Processing
chapter_08
Section titled “chapter_08”node-book_markov-models-with-python_chapter-08-2d-hmm-for-image-processing — 2D HMM for Image Processing
chapter_09
Section titled “chapter_09”node-book_markov-models-with-python_chapter-09-markov-decision-process — Markov Decision Process
Using Hidden Markov Models (HMMs) is a technique for modeling Markov processes with unobserved states. They are a special case of Dynamic Bayesian Networks (DBNs) but have been found to perform well in a wide range of problems. One of the areas where HMMs are used a lot is speech recognition because HMMs are able to provide a very natural way to model speech data. This book starts by introducing the theoretical aspects of HMMs from the basics of probability theory, and then talks about the different applications of HMMs.
A basic understanding of probability theory, linear algebra, and calculus will make reading this book a lot easier. For the code examples, basic familiarity with Python programming is expected.
Chapter 1, Introduction to Markov Process, starts with a discussion of basic probability theory, and then introduces Markov chains. The chapter also talks about the different types of Markov chain classifying based on continuous or discrete states and time intervals.
Chapter 2, Hidden Markov Models, builds on the concept of Markov processes and DBNs to introduce the concepts of the HMM.
Chapter 3, State Inference – Predicting the States, introduces algorithms that can be used to predict the states of a defined HMM. The chapter introduces the Forward algorithm, the backward algorithm, the forward-backward algorithm, and the Viterbi algorithm.
Chapter 4, Parameter Inference Using Maximum Likelihood, discusses the basics of maximum likelihood learning. The chapter then moves on to applying maximum likelihood learning in the case of HMMs and introduces the Viterbi learning algorithm and Baum-Welch algorithm.
Chapter 5, Parameter Inference Using Bayesian Approach, starts by introducing the basic concepts of Bayesian learning. The chapter then applies these concepts in the case of HMMs and talks about the different approximation methods used for learning using the Bayesian method.
Chapter 6, Time Series Predicting, discusses the application of HMMs in the case of time series data. The chapter takes the example of the variation of stock prices and tries to model it using an HMM.
Chapter 7, Natural Language Processing, discusses the application of HMMs in the field of speech recognition. The chapter discusses two main areas of application: part-of-speech tagging and speech recognition.
Chapter 8, 2D HMM for Image Processing, introduces the concept of 2D HMMs and discusses their application in the field of image processing.
Chapter 9, Markov Decision Process, introduces the basic concepts of reinforcement learning and then talks about Markov decision process and introduces the Bellman equation to solve them.
You need to have Python 3.4 installed on your machine in order to work through the chapters smoothly.
There are a number of text conventions used throughout this book.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “Now, let’s define the MFCTagger class.”
A block of code is set as follows:
from hmmlearn.hmm import GaussianHMMimport numpy as npimport matplotlib.pyplot as pltAny command-line input or output is written as follows:
pip install matplotlib datetimeBold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: “The possible states of the outcomes are also known as the domain of the random variable.”
Warnings or important notes appear like this.
Tips and tricks appear like this.
Feedback from our readers is always welcome.