class_docstr: Base class for Joint Probability Distribution
class_docstr_tok: ["Base","class","for","Joint","Probability","Distribution"]
docstr: Returns the independent variables in the joint probability distribution.
  Returns marginally independent variables if condition=None.
  Returns conditionally independent variables if condition!=None
  
  Parameters
  ----------
  condition: array_like
          Random Variable on which to condition the Joint Probability Distribution.
  
  Examples
  --------
  >>> import numpy as np
  >>> from pgmpy.factors.discrete import JointProbabilityDistribution
  >>> prob = JointProbabilityDistribution(['x1', 'x2', 'x3'], [2, 3, 2], np.ones(12)/12)
  >>> prob.get_independencies()
  (x1 ⟂ x2)
  (x1 ⟂ x3)
  (x2 ⟂ x3)
docstr_tok: ["Returns","the","independent","variables","in","the","joint","probability","distribution",".","Returns","marginally","independent","variables","if","condition=None",".","Returns","conditionally","independent","variables","if","condition","!","=None","Parameters","--","--","--","--","--","condition",":","array_like","Random","Variable","on","which","to","condition","the","Joint","Probability","Distribution",".","Examples","--","--","--","--",">",">",">","import","numpy","as","np",">",">",">","from","pgmpy.factors.discrete","import","JointProbabilityDistribution",">",">",">","prob","=","JointProbabilityDistribution","(","[","'x1","'",",","'x2","'",",","'x3","'","]",",","[","2",",","3",",","2","]",",","np.ones","(","12",")","\/12",")",">",">",">","prob.get_independencies","(",")","(","x1","\u27c2","x2",")","(","x1","\u27c2","x3",")","(","x2","\u27c2","x3",")"]
code: def get_independencies(self, condition=None):
      """
      Returns the independent variables in the joint probability distribution.
      Returns marginally independent variables if condition=None.
      Returns conditionally independent variables if condition!=None
  
      Parameters
      ----------
      condition: array_like
              Random Variable on which to condition the Joint Probability Distribution.
  
      Examples
      --------
      >>> import numpy as np
      >>> from pgmpy.factors.discrete import JointProbabilityDistribution
      >>> prob = JointProbabilityDistribution(['x1', 'x2', 'x3'], [2, 3, 2], np.ones(12)/12)
      >>> prob.get_independencies()
      (x1 \u27C2 x2)
      (x1 \u27C2 x3)
      (x2 \u27C2 x3)
      """
      JPD = self.copy()
      if condition:
          JPD.conditional_distribution(condition)
      independencies = Independencies()
      for variable_pair in itertools.combinations(
          list(JPD.variables), 2
      ):
          if JPD.marginal_distribution(
              variable_pair, inplace=False
          ) == JPD.marginal_distribution(
              variable_pair[0], inplace=False
          ) * JPD.marginal_distribution(
              variable_pair[1], inplace=False
          ):
              independencies.add_assertions(variable_pair)
      return independencies
  
file_path: pgmpy/pgmpy/factors/discrete/JointProbabilityDistribution.py
imports: import itertools
  from functools import reduce
  from operator import mul
  import numpy
  from pgmpy.factors.discrete import DiscreteFactor
  from pgmpy.independencies import Independencies
label_desc: Use image node_id 6 for calling the JointProbabilityDistribution obj's underlying member method code with example usage: obj.get_independencies(condition) and returns: independencies