def is_imap(self, model):
        from pgmpy.models import BayesianModel
        if not isinstance(model, BayesianModel):
            raise TypeError("model must be an instance of BayesianModel")
        factors = [cpd.to_factor() for cpd in model.get_cpds()]
        factor_prod = six.moves.reduce(mul, factors)
        JPD_fact = Factor(self.variables, self.cardinality, self.values)
        if JPD_fact == factor_prod:
            return True
        else:
            return False
Adds a 'comment' to the cursor.
dataset/ETHPy150Open pgmpy/pgmpy/pgmpy/factors/JointProbabilityDistribution.py/JointProbabilityDistribution.is_imap--crossover with--dataset/ETHPy150Open blynch/CloudMemeBackend/pymongo/cursor.py/Cursor.comment