Seems that we cannot import everything we need directly from pgmpy.factors, symbols are separated into sub modules (but I feel it a little messy). To be concrete,
from pgmpy.factors import JointGaussianDistribution as JGD -> from pgmpy.factors.distributions import GaussianDistribution as JGD
from pgmpy.factors import CanonicalFactor -> from pgmpy.factors.continuous import CanonicalDistribution
from pgmpy.factors import LinearGaussianCPD -> from pgmpy.factors.continuous import LinearGaussianCPD
(There is also a bug in the implementation of LinearGaussianBayesianNetwork.add_cpds so the notebook contains a little hack to deal with that which should be removed after the bug fixed.)
Seems that we cannot import everything we need directly from
pgmpy.factors
, symbols are separated into sub modules (but I feel it a little messy). To be concrete,from pgmpy.factors import JointGaussianDistribution as JGD
->from pgmpy.factors.distributions import GaussianDistribution as JGD
from pgmpy.factors import CanonicalFactor
->from pgmpy.factors.continuous import CanonicalDistribution
from pgmpy.factors import LinearGaussianCPD
->from pgmpy.factors.continuous import LinearGaussianCPD
(There is also a bug in the implementation of
LinearGaussianBayesianNetwork.add_cpds
so the notebook contains a little hack to deal with that which should be removed after the bug fixed.)