This chapter discusses two powerful techniques used in advanced statistics. The first one, Bayesian networks (usually referred to as BNs), is a graphical model based on Bayesian theory, which is used to represent probabilistic relationships between several variables. The second one, the hidden Markov model (HMM), is a model that can handle both observable and non-observable variables that affect a dependent variable. In the simplest scenario, we might observe whether people arrive at an office with an umbrella or not, with the intention of deducing whether it was raining or not.
This chapter is divided into two parts: there are four recipes dedicated to BNs and three recipes dedicated to HMMs.