I am following the book "Mastering Probabilistic Graphical Models using Python". The book's code is with an older version, but I have installed the latest version 0.1.9
So I am, not finding some of the functions used in the book. Some of the problems I could figure out for myself, eg pgmpy.factors to be replaced by pgmpy.factors.discrete in some of the examples.
However, I am now looking for the function TreeCPD and Factor (for the code on page 29):
from pgmpy.factors import TreeCPD, Factor
Where has this function moved? And if this function is now obsolete, and I need to use some other function, what is the new function?