8e46c0dfb78769a3f97db273e3c608059b74bdfa,pgmpy/factors/JointProbabilityDistribution.py,JointProbabilityDistribution,check_independence,#JointProbabilityDistribution#Any#Any#Any#,135

Before Change


        JPD = self.copy()
        if event3:
            if isinstance(event3, six.string_types):
                raise TypeError("Event 3 A list of tuples of the form (variable_name, variable_state")
            JPD.conditional_distribution(event3)
        if isinstance(event1, six.string_types):
            raise TypeError("Event 1 should be a list or array-like structure")
        if isinstance(event2, six.string_types):

After Change


                    phi1 = Factor(JPD_prod.variables, JPD_prod.cardinality, JPD.values)
                    phi2 = Factor(JPD.variables, JPD.cardinality, JPD.values)
                    phi = phi1 / phi2
                    if(np.unique(phi.values).size != 1):
                        return False
                return True
            else:
                    JPD.conditional_distribution(event3)
        for variable_pair in itertools.product(event1, event2):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: pgmpy/pgmpy
Commit Name: 8e46c0dfb78769a3f97db273e3c608059b74bdfa
Time: 2016-01-05
Author: utkarsh.gupta550@gmail.com
File Name: pgmpy/factors/JointProbabilityDistribution.py
Class Name: JointProbabilityDistribution
Method Name: check_independence


Project Name: merenlab/anvio
Commit Name: 494c8eca414b05627815a00ec6c5563fb83e2a5c
Time: 2019-10-08
Author: a.murat.eren@gmail.com
File Name: anvio/scgtaxonomyops.py
Class Name: SCGTaxonomyEstimator
Method Name: get_consensus_taxonomy


Project Name: pfnet-research/chainer-chemistry
Commit Name: 068579d13cadb4a0409538e3e2a9baf13a31f218
Time: 2018-07-02
Author: mottodora@gmail.com
File Name: chainer_chemistry/training/extensions/prc_auc_evaluator.py
Class Name: PRCAUCEvaluator
Method Name: calc_metric