53bc1480e10f6594574850a05e20b3616d904dfe,pgmpy/inference/base.py,Inference,__init__,#Inference#,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:
                    try:
                        self.factors[var].append(factor)
                    except KeyError:

After Change


    def __init__(self, model):
        self.variables = model.nodes()
        self.cardinality = {}
        self.factors = defaultdict(list)

        model.check_model()

        if isinstance(model, BayesianModel):
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: scikit-optimize/scikit-optimize
Commit Name: 45ffcc4d387da3e767ea675640f411dbea349ff0
Time: 2017-06-28
Author: iaroslav.email@gmail.com
File Name: skopt/wrappers/scikit_learn.py
Class Name: SkoptSearchCV
Method Name: __init__


Project Name: raghakot/keras-vis
Commit Name: 9f221345e7a58804e347f2a1879b06922222413b
Time: 2017-07-03
Author: ragha@outlook.com
File Name: docs/md_autogen.py
Class Name: MarkdownAPIGenerator
Method Name: module2md