class_docstr: Base class of *DiscreteFactor Sets*.
  
  A factor set provides a compact representation of  higher dimensional factor
  :math:`\phi_1\cdot\phi_2\cdots\phi_n`
  
  For example the factor set corresponding to factor :math:`\phi_1\cdot\phi_2` would be the union of the factors
  :math:`\phi_1` and :math:`\phi_2` i.e. factor set :math:`\vec\phi = \phi_1 \cup \phi_2`.
class_docstr_tok: ["Base","class","of","*","DiscreteFactor","Sets","*",".","A","factor","set","provides","a","compact","representation","of","higher","dimensional","factor",":","math",":","`","\\phi_1\\cdot\\phi_2\\cdots\\phi_n","`","For","example","the","factor","set","corresponding","to","factor",":","math",":","`","\\phi_1\\cdot\\phi_2","`","would","be","the","union","of","the","factors",":","math",":","`","\\phi_1","`","and",":","math",":","`","\\phi_2","`","i.e",".","factor","set",":","math",":","`","\\vec\\phi","=","\\phi_1","\\cup","\\phi_2","`","."]
docstr: Create a copy of factor set.
  
  Examples
  --------
  >>> from pgmpy.factors import FactorSet
  >>> from pgmpy.factors.discrete import DiscreteFactor
  >>> phi1 = DiscreteFactor(['x1', 'x2', 'x3'], [2, 3, 2], range(12))
  >>> phi2 = DiscreteFactor(['x3', 'x4', 'x1'], [2, 2, 2], range(8))
  >>> factor_set = FactorSet(phi1, phi2)
  >>> factor_set
  <pgmpy.factors.FactorSet.FactorSet at 0x7fa68f390320>
  >>> factor_set_copy = factor_set.copy()
  >>> factor_set_copy
  <pgmpy.factors.FactorSet.FactorSet at 0x7f91a0031160>
docstr_tok: ["Create","a","copy","of","factor","set",".","Examples","--","--","--","--",">",">",">","from","pgmpy.factors","import","FactorSet",">",">",">","from","pgmpy.factors.discrete","import","DiscreteFactor",">",">",">","phi1","=","DiscreteFactor","(","[","'x1","'",",","'x2","'",",","'x3","'","]",",","[","2",",","3",",","2","]",",","range","(","12",")",")",">",">",">","phi2","=","DiscreteFactor","(","[","'x3","'",",","'x4","'",",","'x1","'","]",",","[","2",",","2",",","2","]",",","range","(","8",")",")",">",">",">","factor_set","=","FactorSet","(","phi1",",","phi2",")",">",">",">","factor_set","<","pgmpy.factors.FactorSet.FactorSet","at","0x7fa68f390320",">",">",">",">","factor_set_copy","=","factor_set.copy","(",")",">",">",">","factor_set_copy","<","pgmpy.factors.FactorSet.FactorSet","at","0x7f91a0031160",">"]
code: def copy(self):
      """
      Create a copy of factor set.
  
      Examples
      --------
      >>> from pgmpy.factors import FactorSet
      >>> from pgmpy.factors.discrete import DiscreteFactor
      >>> phi1 = DiscreteFactor(['x1', 'x2', 'x3'], [2, 3, 2], range(12))
      >>> phi2 = DiscreteFactor(['x3', 'x4', 'x1'], [2, 2, 2], range(8))
      >>> factor_set = FactorSet(phi1, phi2)
      >>> factor_set
      <pgmpy.factors.FactorSet.FactorSet at 0x7fa68f390320>
      >>> factor_set_copy = factor_set.copy()
      >>> factor_set_copy
      <pgmpy.factors.FactorSet.FactorSet at 0x7f91a0031160>
      """
      # No need to have copies of factors as argument because __init__ method creates copies.
      return FactorSet(*self.factors)
  
file_path: pgmpy/pgmpy/factors/FactorSet.py
imports: from functools import reduce
  from pgmpy.factors.base import BaseFactor
label_desc: Use image node_id 11 for calling the FactorSet obj's underlying member method code with example usage: obj.copy() and returns: FactorSet