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

Before Change


            factors = [factor for factor in working_factors[var]
                       if not set(factor.variables).intersection(eliminated_variables)]
            phi = factor_product(*factors)
            phi.reduce("{variable}_0".format(variable=var))
            cliques.add(tuple(phi.scope()))
            del working_factors[var]
            for variable in phi.variables:

After Change


        for var in elimination_order:
            factors = [factor for factor in working_factors[var]
                if not set(factor).intersection(eliminated_variables)]
            phi = set(itertools.chain(*factors)).difference({var})
            cliques.add(tuple(phi))
            del working_factors[var]
            for variable in phi:
                working_factors[variable].append(list(phi))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 2

Instances


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


Project Name: EpistasisLab/penn-ml-benchmarks
Commit Name: dad5e0183c018099083aa9d683372a1344baee13
Time: 2020-05-14
Author: williamlacava@gmail.com
File Name: tests/test_metadata.py
Class Name:
Method Name: test_dataset


Project Name: HazyResearch/fonduer
Commit Name: b9dc15ecef0393a55a953acff3c1d0278b19d9f5
Time: 2018-09-01
Author: lwhsiao@stanford.edu
File Name: src/fonduer/utils/utils_udf.py
Class Name:
Method Name: add_keys


Project Name: aertslab/pySCENIC
Commit Name: 123e51b8a8708cf105eb0f0c8f268d1e087e712e
Time: 2018-04-19
Author: vandesande.bram@gmail.com
File Name: src/pyscenic/genesig.py
Class Name: Regulon
Method Name: difference