Пример #1
0
 def __init__(self, vars=None, factors=None):
     """vars is a list of variables
     factors is a list of factors (instances of Prob and Utility)
     """
     Graphical_model.__init__(self, vars, factors)
Пример #2
0
 def query(self, var):
     """returns the posterior probability of current variable var"""
     return VE(Graphical_model(self.dbn.vars1, self.current_factors)).query(
         var, self.current_obs)