53bc1480e10f6594574850a05e20b3616d904dfe,pgmpy/inference/base.py,Inference,__init__,#Inference#Any#,50

Before Change


                if not set(factor.variables.keys()).issubset(set(self.variables)):
                    raise ValueError("Factors are not consistent with the model")

                for index in range(len(factor.variables)):
                    self.cardinality[list(factor.variables.keys())[index]] = factor.cardinality[index]

                for var in factor.variables:

After Change


        self.cardinality = {}
        self.factors = defaultdict(list)

        model.check_model()

        if isinstance(model, BayesianModel):
            for node in model.nodes():
                cpd = model.get_cpds(node)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: pgmpy/pgmpy
Commit Name: 53bc1480e10f6594574850a05e20b3616d904dfe
Time: 2014-12-21
Author: abinash.panda.ece10@itbhu.ac.in
File Name: pgmpy/inference/base.py
Class Name: Inference
Method Name: __init__


Project Name: pgmpy/pgmpy
Commit Name: c7fccd2bfe6009797a984eeeef930790d35e397a
Time: 2015-01-04
Author: abinash.panda.ece10@itbhu.ac.in
File Name: pgmpy/models/FactorGraph.py
Class Name: FactorGraph
Method Name: get_factor_nodes


Project Name: pgmpy/pgmpy
Commit Name: 5a53f60e5143ab6f416437dadddd2f1df133a247
Time: 2015-04-07
Author: abinash.panda.ece10@itbhu.ac.in
File Name: pgmpy/models/JunctionTree.py
Class Name: JunctionTree
Method Name: check_model