Home Page Icon
Home Page
Table of Contents for
Index
Close
Index
by Abinash Panda, Ankur Ankan
Mastering Probabilistic Graphical Models Using Python
Mastering Probabilistic Graphical Models Using Python
Table of Contents
Mastering Probabilistic Graphical Models Using Python
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Bayesian Network Fundamentals
Probability theory
Random variable
Independence and conditional independence
Installing tools
IPython
pgmpy
Representing independencies using pgmpy
Representing joint probability distributions using pgmpy
Conditional probability distribution
Representing CPDs using pgmpy
Graph theory
Nodes and edges
Walk, paths, and trails
Bayesian models
Representation
Factorization of a distribution over a network
Implementing Bayesian networks using pgmpy
Bayesian model representation
Reasoning pattern in Bayesian networks
D-separation
Direct connection
Indirect connection
Relating graphs and distributions
IMAP
IMAP to factorization
CPD representations
Deterministic CPDs
Context-specific CPDs
Tree CPD
Rule CPD
Summary
2. Markov Network Fundamentals
Introducing the Markov network
Parameterizing a Markov network – factor
Factor operations
Gibbs distributions and Markov networks
The factor graph
Independencies in Markov networks
Constructing graphs from distributions
Bayesian and Markov networks
Converting Bayesian models into Markov models
Converting Markov models into Bayesian models
Chordal graphs
Summary
3. Inference – Asking Questions to Models
Inference
Complexity of inference
Variable elimination
Analysis of variable elimination
Finding elimination ordering
Using the chordal graph property of induced graphs
Minimum fill/size/weight/search
Belief propagation
Clique tree
Constructing a clique tree
Message passing
Clique tree calibration
Message passing with division
Factor division
Querying variables that are not in the same cluster
MAP inference
MAP using variable elimination
Factor maximization
MAP using belief propagation
Finding the most probable assignment
Predictions from the model using pgmpy
A comparison of variable elimination and belief propagation
Summary
4. Approximate Inference
The optimization problem
The energy function
Exact inference as an optimization
The propagation-based approximation algorithm
Cluster graph belief propagation
Constructing cluster graphs
Pairwise Markov networks
Bethe cluster graph
Propagation with approximate messages
Message creation
Inference with approximate messages
Sum-product expectation propagation
Belief update propagation
MAP inference
Sampling-based approximate methods
Forward sampling
Conditional probability distribution
Likelihood weighting and importance sampling
Importance sampling
Importance sampling in Bayesian networks
Computing marginal probabilities
Ratio likelihood weighting
Normalized likelihood weighting
Markov chain Monte Carlo methods
Gibbs sampling
Markov chains
The multiple transitioning model
Using a Markov chain
Collapsed particles
Collapsed importance sampling
Summary
5. Model Learning – Parameter Estimation in Bayesian Networks
General ideas in learning
The goals of learning
Density estimation
Predicting the specific probability values
Knowledge discovery
Learning as an optimization
Empirical risk and overfitting
Discriminative versus generative training
Learning task
Model constraints
Data observability
Parameter learning
Maximum likelihood estimation
Maximum likelihood principle
The maximum likelihood estimate for Bayesian networks
Bayesian parameter estimation
Priors
Bayesian parameter estimation for Bayesian networks
Structure learning in Bayesian networks
Methods for the learning structure
Constraint-based structure learning
Structure score learning
The likelihood score
The Bayesian score
The Bayesian score for Bayesian networks
Summary
6. Model Learning – Parameter Estimation in Markov Networks
Maximum likelihood parameter estimation
Likelihood function
Log-linear model
Gradient ascent
Learning with approximate inference
Belief propagation and pseudo-moment matching
Structure learning
Constraint-based structure learning
Score-based structure learning
The likelihood score
Bayesian score
Summary
7. Specialized Models
The Naive Bayes model
Why does it even work?
Types of Naive Bayes models
Multivariate Bernoulli Naive Bayes model
Multinomial Naive Bayes model
Choosing the right model
Dynamic Bayesian networks
Assumptions
Discrete timeline assumption
The Markov assumption
Model representation
The Hidden Markov model
Generating an observation sequence
Computing the probability of an observation
The forward-backward algorithm
Computing the state sequence
Applications
The acoustic model
The language model
Summary
Index
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Summary
Index
A
approximate inference
about /
Learning with approximate inference
belief propagation /
Belief propagation and pseudo-moment matching
pseudo-moment matching /
Belief propagation and pseudo-moment matching
approximate messages
about /
Propagation with approximate messages
computing /
Message creation
inference /
Inference with approximate messages
assumptions, dynamic Bayesian networks (DBNs)
discrete timeline assumption /
Discrete timeline assumption
Markov assumption /
The Markov assumption
B
Bayesian classifier
about /
The Naive Bayes model
Bayesian model averaging
about /
Methods for the learning structure
Bayesian models
about /
Bayesian models
representation /
Representation
factorization, of distribution over network /
Factorization of a distribution over a network
D-separation /
D-separation
converting, into Markov models /
Converting Bayesian models into Markov models
Markov models, converting into /
Converting Markov models into Bayesian models
Bayesian network (2-TBN)
about /
Model representation
Bayesian network (BN)
about /
Factorization of a distribution over a network
Bayesian networks
implementing, pgmpy used /
Implementing Bayesian networks using pgmpy
representation /
Bayesian model representation
pattern, reasoning /
Reasoning pattern in Bayesian networks
and Markov network /
Bayesian and Markov networks
importance sampling /
Importance sampling in Bayesian networks
structure learning /
Structure learning in Bayesian networks
Bayesian parameter estimation
about /
Bayesian parameter estimation
priors /
Priors
for Bayesian networks /
Bayesian parameter estimation for Bayesian networks
local decomposition /
Bayesian parameter estimation for Bayesian networks
Bayesian score
for Bayesian networks /
The Bayesian score for Bayesian networks
for Markov models /
Bayesian score
belief propagation
about /
Belief propagation
,
Belief propagation and pseudo-moment matching
clique tree /
Clique tree
message passing /
Message passing
using, for MAP /
MAP using belief propagation
versus variable elimination /
A comparison of variable elimination and belief propagation
with approximate messages /
Propagation with approximate messages
belief update propagation
about /
Belief update propagation
MAP inference /
MAP inference
Bethe cluster graph
about /
Bethe cluster graph
C
causal reasoning
about /
Reasoning pattern in Bayesian networks
chordal graphs
about /
Chordal graphs
classification error
about /
Predicting the specific probability values
clique tree
about /
Clique tree
defining /
Clique tree
constructing /
Constructing a clique tree
calibration /
Clique tree calibration
cluster graph belief propagation
about /
Cluster graph belief propagation
cluster graphs
constructing /
Constructing cluster graphs
constructing, with pairwise Markov networks /
Pairwise Markov networks
Bethe cluster graph /
Bethe cluster graph
collapsed importance sampling
about /
Collapsed importance sampling
collapsed particles
about /
Sampling-based approximate methods
,
Collapsed particles
conditional independence
about /
Independence and conditional independence
conditional probability distribution
about /
Conditional probability distribution
constrained satisfaction problem (CSP)
about /
MAP inference
constraint-based structure learning
about /
Methods for the learning structure
,
Constraint-based structure learning
structure score learning /
Structure score learning
in Markov models /
Constraint-based structure learning
limitations /
Constraint-based structure learning
context-specific CPDs
about /
Context-specific CPDs
Tree CPD /
Tree CPD
Rule CPD /
Rule CPD
CPD
about /
Conditional probability distribution
,
Representation
representing, pgmpy used /
Representing CPDs using pgmpy
representations /
CPD representations
deterministic CPDs /
Deterministic CPDs
context-specific CPDs /
Context-specific CPDs
D
D-separation
about /
D-separation
,
Independencies in Markov networks
direct connection /
Direct connection
indirect connection /
Indirect connection
decoding
about /
MAP inference
deterministic CPDs
about /
Deterministic CPDs
Directed Acyclic Graph (DAG)
about /
Representation
discriminative learning
about /
Discriminative versus generative training
versus generative training /
Discriminative versus generative training
distributions
and graphs, relating /
Relating graphs and distributions
graphs, constructing from /
Constructing graphs from distributions
dynamic Bayesian networks (DBNs)
about /
Dynamic Bayesian networks
assumptions /
Assumptions
model representation /
Model representation
E
0/1 error
about /
Predicting the specific probability values
edges
about /
Nodes and edges
energy function
about /
The energy function
energy term /
The energy function
entropy term /
The energy function
energy term
about /
The energy function
entropy term
about /
The energy function
exact inference
problem solving /
Exact inference as an optimization
expectation-maximization (EM) algorithm
about /
Computing the state sequence
expected log-likelihood
about /
Density estimation
F
factor
about /
Introducing the Markov network
factor division
about /
Factor division
implementing /
Factor division
factor graph
about /
The factor graph
factor maximization
about /
Factor maximization
example /
Factor maximization
factor operations, Markov network /
Factor operations
Flat Tyre (F)
about /
Context-specific CPDs
forward-backward algorithm
about /
The forward-backward algorithm
forward sampling
about /
Forward sampling
full particles
about /
Sampling-based approximate methods
G
generative learning
about /
Discriminative versus generative training
versus discriminative training /
Discriminative versus generative training
Gibbs distribution
and Markov network /
Gibbs distributions and Markov networks
Gibbs sampling
about /
Gibbs sampling
Markov chain /
Markov chains
gradient ascent
about /
Gradient ascent
graphs
and distributions, relating /
Relating graphs and distributions
IMAP /
IMAP
IMAP, to factorization /
IMAP to factorization
constructing, from distributions /
Constructing graphs from distributions
graph theory
about /
Graph theory
nodes /
Nodes and edges
edges /
Nodes and edges
walk /
Walk, paths, and trails
paths /
Walk, paths, and trails
trails /
Walk, paths, and trails
cycles /
Walk, paths, and trails
H
Hamming loss
about /
Predicting the specific probability values
hidden Markov model (HMM)
about /
The Hidden Markov model
observation sequence, generating /
Generating an observation sequence
probability of observation, computing /
Computing the probability of an observation
forward-backward algorithm /
The forward-backward algorithm
state sequence, computing /
Computing the state sequence
applications /
Applications
HMM-based speech recognition system /
Applications
HMM-based speech recognition system
about /
Applications
acoustic model /
The acoustic model
language model /
The language model
I
IMAP
about /
IMAP
to factorization /
IMAP to factorization
importance sampling
about /
Likelihood weighting and importance sampling
,
Importance sampling
in Bayesian networks /
Importance sampling in Bayesian networks
marginal probabilities, computing /
Computing marginal probabilities
ratio likelihood weighting /
Ratio likelihood weighting
normalized likelihood weighting /
Normalized likelihood weighting
independence
about /
Independence and conditional independence
representing, pgmpy used /
Representing independencies using pgmpy
independencies, in Markov network
about /
Independencies in Markov networks
induced graphs
width /
Finding elimination ordering
induced width /
Finding elimination ordering
tree width /
Finding elimination ordering
inference
about /
Inference
example /
Inference
complexity /
Complexity of inference
with approximate messages /
Inference with approximate messages
sum-product expectation propagation /
Sum-product expectation propagation
belief update propagation /
Belief update propagation
IPython
installing /
IPython
URL /
IPython
J
joint probability distribution
about /
Independence and conditional independence
representing, pgmpy used /
Representing joint probability distributions using pgmpy
L
Lagrangian multipliers
using /
Exact inference as an optimization
Lauritzen-Spiegelhalter algorithm
about /
Factor division
learning
general ideas /
General ideas in learning
goals /
The goals of learning
density estimation /
Density estimation
specific probability values, predicting /
Predicting the specific probability values
knowledge discovery /
Knowledge discovery
optimization problem /
Learning as an optimization
empirical risk /
Empirical risk and overfitting
overfitting /
Empirical risk and overfitting
learning task
about /
Learning task
model constraints /
Model constraints
data observability /
Data observability
Lidstone smoothing
about /
Multinomial Naive Bayes model
likelihood function
about /
Likelihood function
log-linear model /
Log-linear model
gradient ascent /
Gradient ascent
likelihood score
for Markov models /
The likelihood score
likelihood weighting
about /
Likelihood weighting and importance sampling
log-linear model
about /
Log-linear model
M
MAP
variable elimination, using /
MAP using variable elimination
belief propagation, using /
MAP using belief propagation
MAP inference
about /
MAP inference
,
MAP inference
marginal probabilities
computing /
Computing marginal probabilities
Markov blanket
about /
Independencies in Markov networks
Markov chain
Gibbs sampling /
Markov chains
distributions converge, checking /
Markov chains
using /
Using a Markov chain
Markov chain Monte Carlo methods
about /
Markov chain Monte Carlo methods
Markovian
about /
The Markov assumption
Markov models
Bayesian models, converting into /
Converting Bayesian models into Markov models
converting, into Bayesian models /
Converting Markov models into Bayesian models
maximum likelihood parameter estimation /
Maximum likelihood parameter estimation
structure learning /
Structure learning
constraint-based structure learning /
Constraint-based structure learning
score-based structure learning /
Score-based structure learning
likelihood score /
The likelihood score
Markov models, indecencies
local Markov independencies /
Constraint-based structure learning
pair-wise independencies /
Constraint-based structure learning
global independencies /
Constraint-based structure learning
Markov network
about /
Introducing the Markov network
parameterizing /
Parameterizing a Markov network – factor
factor operations /
Factor operations
and Gibbs distribution /
Gibbs distributions and Markov networks
independencies /
Independencies in Markov networks
and Bayesian networks /
Bayesian and Markov networks
Markov networks
maximum likelihood parameter estimation /
Maximum likelihood parameter estimation
Markov process
about /
The Hidden Markov model
maximization
about /
Factor maximization
maximum likelihood parameter estimation
in Markov networks /
Maximum likelihood parameter estimation
likelihood function /
Likelihood function
learning, with approximate inference /
Learning with approximate inference
structure learning /
Structure learning
score-based structure learning /
Score-based structure learning
message passing
about /
Message passing
with division /
Message passing with division
implementing, with factor division /
Factor division
variables from different clusters, querying /
Querying variables that are not in the same cluster
model
variable states, predicting with pgmpy /
Predictions from the model using pgmpy
moral graph /
Converting Bayesian models into Markov models
moralization, of network /
Converting Bayesian models into Markov models
most probable assignment
searching /
Finding the most probable assignment
example /
Finding the most probable assignment
multinomial Naive Bayes model
about /
Multinomial Naive Bayes model
multiple transitioning model
about /
The multiple transitioning model
multivariate Bernoulli Naive Bayes model
about /
Multivariate Bernoulli Naive Bayes model
implementation /
Multivariate Bernoulli Naive Bayes model
mutilated network proposal distribution
about /
Importance sampling in Bayesian networks
N
Naive Bayes model
about /
The Naive Bayes model
usage /
Why does it even work?
types /
Types of Naive Bayes models
multivariate Bernoulli Naive Bayes model /
Multivariate Bernoulli Naive Bayes model
multinomial Naive Bayes model /
Multinomial Naive Bayes model
best model, selecting /
Choosing the right model
nodes
about /
Nodes and edges
normalized importance sampling estimator
about /
Importance sampling
normalized likelihood weighting
about /
Normalized likelihood weighting
O
optimization problem
about /
The optimization problem
P
pairwise independency
about /
Independencies in Markov networks
pairwise Markov networks
cluster graphs, constructing /
Pairwise Markov networks
parameter learning
about /
Parameter learning
maximum likelihood estimation /
Maximum likelihood estimation
maximum likelihood principle /
Maximum likelihood principle
maximum likelihood estimation, for Bayesian networks /
The maximum likelihood estimate for Bayesian networks
particle
about /
Sampling-based approximate methods
particle-based methods
about /
Sampling-based approximate methods
Perfect Map
about /
IMAP
pgmpy
installing /
pgmpy
URL /
pgmpy
used, for representing independence /
Representing independencies using pgmpy
used, for representing joint probability distribution /
Representing joint probability distributions using pgmpy
used, for implementing CPD /
Representing CPDs using pgmpy
used, for implementing Bayesian networks /
Implementing Bayesian networks using pgmpy
used, for predicting variable states from model /
Predictions from the model using pgmpy
probability theory
about /
Probability theory
random variable /
Random variable
independence /
Independence and conditional independence
conditional independence /
Independence and conditional independence
propagation based approximation algorithm
about /
The propagation-based approximation algorithm
example /
The propagation-based approximation algorithm
cluster graph belief propagation /
Cluster graph belief propagation
cluster graphs, constructing /
Constructing cluster graphs
pseudo-moment matching
about /
Belief propagation and pseudo-moment matching
pseudo max-marginals
about /
MAP inference
R
random variable
about /
Random variable
Rao-Blackwellized particles
about /
Collapsed particles
ratio likelihood weighting
about /
Ratio likelihood weighting
relative entropy
about /
The optimization problem
Rule CPD
about /
Rule CPD
S
sampling-based approximate methods
about /
Sampling-based approximate methods
score-based structure learning
about /
Methods for the learning structure
in Markov models /
Score-based structure learning
likelihood score /
The likelihood score
Bayesian score /
Bayesian score
structure learning
about /
Structure learning in Bayesian networks
in Bayesian networks /
Structure learning in Bayesian networks
methods /
Methods for the learning structure
in Markov models /
Structure learning
constraint-based structure learning /
Constraint-based structure learning
structure learning, methods
constraint-based structure learning /
Methods for the learning structure
score-based structure learning /
Methods for the learning structure
Bayesian model averaging /
Methods for the learning structure
structure score learning
about /
Structure score learning
likelihood score /
The likelihood score
Bayesian score /
The Bayesian score
sum-product expectation propagation
about /
Sum-product expectation propagation
T
target distribution
about /
Importance sampling
tf-idf
about /
Multivariate Bernoulli Naive Bayes model
tools
IPython, installing /
Installing tools
pgmpy, installing /
Installing tools
Tree CPD
about /
Tree CPD
triangulation
about /
Converting Markov models into Bayesian models
U
unnormalized importance sampling estimator
about /
Importance sampling
V
variable elimination
about /
Variable elimination
example /
Variable elimination
analyzing /
Analysis of variable elimination
elimination order, searching /
Finding elimination ordering
using, for MAP /
MAP using variable elimination
versus belief propagation /
A comparison of variable elimination and belief propagation
variable elimination order
searching /
Finding elimination ordering
searching, chordal graph property used /
Using the chordal graph property of induced graphs
cost criteria /
Minimum fill/size/weight/search
variable elimination order, cost criteria
min-neighbors /
Minimum fill/size/weight/search
min-weight /
Minimum fill/size/weight/search
min-fill /
Minimum fill/size/weight/search
weighted-min-fill /
Minimum fill/size/weight/search
variables connection
indirect causal effect /
Indirect connection
indirect evidential effect /
Indirect connection
common cause /
Indirect connection
vertices
about /
Nodes and edges
W
weighted importance sampling estimator
about /
Importance sampling
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset