005cd59c9327b7376cd5140ea5f0435620964669,pgmpy/inference/Sampling.py,BayesianModelSampling,__init__,#BayesianModelSampling#,32

Before Change


    
    def __init__(self, model):
        if not isinstance(model, BayesianModel):
            raise TypeError("model must an instance of BayesianModel")
        super(BayesianModelSampling, self).__init__(model)
        self.topological_order = nx.topological_sort(model)
        self.cpds = {node: model.get_cpds(node) for node in model.nodes()}

After Change


    
    def __init__(self, model):
        if not isinstance(model, BayesianModel):
            raise TypeError("Model expected type: BayesianModel, got type: ", type(model))

        self.topological_order = nx.topological_sort(model)
        super(BayesianModelSampling, self).__init__(model)
        // self.cpds = {node: model.get_cpds(node) for node in model.nodes()}
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: pgmpy/pgmpy
Commit Name: 005cd59c9327b7376cd5140ea5f0435620964669
Time: 2015-11-17
Author: ankurankan@gmail.com
File Name: pgmpy/inference/Sampling.py
Class Name: BayesianModelSampling
Method Name: __init__


Project Name: ChrisCummins/clgen
Commit Name: 92cd4cd05470ac382cc5d4765d77f1e26d27161c
Time: 2019-12-04
Author: chrisc.101@gmail.com
File Name: labm8/py/internal/flags_parsers.py
Class Name: PathParser
Method Name: convert


Project Name: ChrisCummins/clgen
Commit Name: 92cd4cd05470ac382cc5d4765d77f1e26d27161c
Time: 2019-12-04
Author: chrisc.101@gmail.com
File Name: labm8/py/internal/flags_parsers.py
Class Name: DatabaseParser
Method Name: convert