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)
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)