97b2ccec94583a7876566a340f06e84a63340272,pgmpy/inference/ExactInference.py,VariableElimination,induced_graph,#VariableElimination#Any#,210

Before Change


        edges = []
        // add edges corresponding to each clique
        for clique in filter(lambda x: len(x) > 1, cliques):
            for i, j in itertools.combinations(clique, 2):
                edges.append((i, j))

        // Final induced graph

After Change


                working_factors[variable].append(list(phi))
            eliminated_variables.add(var)

        edges_comb = [itertools.combinations(c, 2) 
                      for c in filter(lambda x: len(x) > 1, cliques)]
        return nx.Graph(itertools.chain(*edges_comb))


class BeliefPropagation(Inference):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: pgmpy/pgmpy
Commit Name: 97b2ccec94583a7876566a340f06e84a63340272
Time: 2015-03-26
Author: pratyaksh@me.com
File Name: pgmpy/inference/ExactInference.py
Class Name: VariableElimination
Method Name: induced_graph


Project Name: shenweichen/DeepCTR
Commit Name: 266090580c44c480d559a15ce2df012eb401adb6
Time: 2020-07-18
Author: iofficium@163.com
File Name: deepctr/layers/interaction.py
Class Name: BilinearInteraction
Method Name: call


Project Name: dgasmith/opt_einsum
Commit Name: a2afaa41a13548806ef624f1530d2ae8912bb818
Time: 2018-02-12
Author: john.gray.14@ucl.ac.uk
File Name: opt_einsum/paths.py
Class Name:
Method Name: greedy


Project Name: OpenMined/PySyft
Commit Name: c428f8c1b790e9e2847da0d728e0d731b7053e80
Time: 2021-02-03
Author: me@madhavajay.com
File Name: tests/syft/core/io/address_test.py
Class Name:
Method Name: _gen_address_kwargs