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 ...
Get Mastering Probabilistic Graphical Models Using Python now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.