▶Book Description
Hidden Markov Model (HMM) is a statistical model based on the Markov chain concept. Hands-On Markov Models with Python helps you get to grips with HMMs and different inference algorithms by working on real-world problems. The hands-on examples explored in the book help you simplify the process flow in machine learning by using Markov model concepts, thereby making it accessible to everyone.
Once you've covered the basic concepts of Markov chains, you'll get insights into Markov processes, models, and types with the help of practical examples. After grasping these fundamentals, you'll move on to learning about the different algorithms used in inferences and applying them in state and parameter inference. In addition to this, you'll explore the Bayesian approach of inference and learn how to apply it in HMMs.
In further chapters, you'll discover how to use HMMs in time series analysis and natural language processing (NLP) using Python. You'll also learn to apply HMM to image processing using 2D-HMM to segment images. Finally, you'll understand how to apply HMM for reinforcement learning (RL) with the help of Q-Learning, and use this technique for single-stock and multi-stock algorithmic trading.
By the end of this book, you will have grasped how to build your own Markov and hidden Markov models on complex datasets in order to apply them to projects.
▶What You Will Learn
⦁ Explore a balance of both theoretical and practical aspects of HMM
⦁ Implement HMMs using different datasets in Python using different packages
⦁ Understand multiple inference algorithms and how to select the right algorithm to resolve your problems
⦁ Develop a Bayesian approach to inference in HMMs
⦁ Implement HMMs in finance, natural language processing (NLP), and image processing
⦁ Determine the most likely sequence of hidden states in an HMM using the Viterbi algorithm
▶Key Features
⦁ Build a variety of Hidden Markov Models (HMM)
⦁ Create and apply models to any sequence of data to analyze, predict, and extract valuable insights
⦁ Use natural language processing (NLP) techniques and 2D-HMM model for image segmentation
▶Who This Book Is For
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.
▶What this book covers
⦁ 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.