ca25da7c55ba436ab557410d5f2e2e9b557d2840,pgmpy/models/MarkovModel.py,MarkovModel,to_junction_tree,#MarkovModel#,412

Before Change


        all_vars = set(self.nodes())

        for node in clique_trees.nodes():
            marginalised_nodes = all_vars - set(node)
            factor_copy = factor.marginalize(list(marginalised_nodes),
                                             inplace=False)
            clique_trees.add_factors(factor_copy)

After Change


        clique_trees = JunctionTree(nx.minimum_spanning_tree(complete_graph).edges())

        // Check whether the factors are defined for all the random variables or not
        all_vars = itertools.chain(*[factor.scope() for factor in self.factors])
        if set(all_vars) != set(self.nodes()):
            ValueError("Factor for all the random variables not specified")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pgmpy/pgmpy
Commit Name: ca25da7c55ba436ab557410d5f2e2e9b557d2840
Time: 2015-03-02
Author: abinash.panda.ece10@itbhu.ac.in
File Name: pgmpy/models/MarkovModel.py
Class Name: MarkovModel
Method Name: to_junction_tree


Project Name: pyinstaller/pyinstaller
Commit Name: b291711152acfcc0df9efa3efef633d6065c4ac9
Time: 2018-05-24
Author: bjones@ece.msstate.edu
File Name: PyInstaller/building/toc_conversion.py
Class Name:
Method Name:


Project Name: IDSIA/sacred
Commit Name: 443e179cfaf8f5502002fbd8e480685d2991eade
Time: 2017-09-14
Author: qwlouse@gmail.com
File Name: sacred/initialize.py
Class Name:
Method Name: create_run