def to_factor(self):
        return Factor(self.variables, self.cardinality, self.values)
Returns JointProbabilityDistribution as a Factor object
dataset/ETHPy150Open pgmpy/pgmpy/pgmpy/factors/JointProbabilityDistribution.py/JointProbabilityDistribution.to_factor