Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Probabilistic Graphical Models with Python

You're reading from  Mastering Probabilistic Graphical Models with Python

Product type Book
Published in Aug 2015
Publisher
ISBN-13 9781784394684
Pages 284 pages
Edition 1st Edition
Languages
Author (1):
Ankur Ankan Ankur Ankan
Profile icon Ankur Ankan
Toc

Table of Contents (14) Chapters close

Mastering Probabilistic Graphical Models Using Python
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
1. Bayesian Network Fundamentals 2. Markov Network Fundamentals 3. Inference – Asking Questions to Models 4. Approximate Inference 5. Model Learning – Parameter Estimation in Bayesian Networks 6. Model Learning – Parameter Estimation in Markov Networks 7. Specialized Models Index

Predictions from the model using pgmpy


In the previous sections, we have seen various algorithms to computing conditional distributions and learnt how to do MAP queries on the models. A MAP query is essentially a way to predict the states of variables, given the states of other variables. In a real-life problem, we are given some data with which we try to create a model for our problem. Then, using this trained model, we try to predict the states of variables for some new data point. This is the process with which we approach our supervised learning problems in machine learning.

Now, to design the models, we need to create CPDs or factors, add them to the base model, create an inference object, and then do MAP queries over it for new data points to predict variable states. This whole process is done very often in machine learning, so pgmpy provides the direct methods fit and predict to simplify the whole process. Let's look at some code to understand how this works. To keep it simple, we...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime