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

Before Change


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

        factor = self.factors[0]
        factor = factor.product(*[self.factors[i] for i in
                                  range(1, len(self.factors))])
        if set(factor.scope()) != set(self.nodes()):
            ValueError("Factor for all the random variables not specified")

After Change


        for node in clique_trees.nodes():
            clique_factors = []
            for factor in self.factors:
                if not is_used[factor] and set(factor.scope()).issubset(node):
                    clique_factors.append(factor)
                    is_used[factor] = True

            clique_potential = factor_product(*clique_factors)
            clique_trees.add_factors(clique_potential)

        if not all(is_used.values()):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

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: daavoo/pyntcloud
Commit Name: 55c52a191bb36313c86ea340a024f4fe21eac699
Time: 2016-10-17
Author: daviddelaiglesiacastro@gmail.com
File Name: pyntcloud/pyntcloud.py
Class Name: PyntCloud
Method Name: __init__


Project Name: pantsbuild/pants
Commit Name: a3cb9c08f86c193f76336284580ff302981388d7
Time: 2019-04-13
Author: john.sirois@gmail.com
File Name: build-support/bin/check_pants_pex_abi.py
Class Name:
Method Name: main