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: Removes factors from the factor set.
  
  Parameters
  ----------
  factors: Factor1, Factor2, ...., Factorn
      factors to be removed from the 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_set1 = FactorSet(phi1, phi2)
  >>> phi3 = DiscreteFactor(['x5', 'x6', 'x7'], [2, 2, 2], range(8))
  >>> factor_set1.add_factors(phi3)
  >>> print(factor_set1)
  set([<DiscreteFactor representing phi(x1:2, x2:3, x3:2) at 0x7f8e32b5b050>,
       <DiscreteFactor representing phi(x5:2, x6:2, x7:2) at 0x7f8e32b5b250>,
       <DiscreteFactor representing phi(x3:2, x4:2, x1:2) at 0x7f8e32b5b150>])
  >>> factor_set1.remove_factors(phi1, phi2)
  >>> print(factor_set1)
  set([<DiscreteFactor representing phi(x5:2, x6:2, x7:2) at 0x7f8e32b4cb10>])
docstr_tok: ["Removes","factors","from","the","factor","set",".","Parameters","--","--","--","--","--","factors",":","Factor1",",","Factor2",",","....",",","Factorn","factors","to","be","removed","from","the","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_set1","=","FactorSet","(","phi1",",","phi2",")",">",">",">","phi3","=","DiscreteFactor","(","[","'x5","'",",","'x6","'",",","'x7","'","]",",","[","2",",","2",",","2","]",",","range","(","8",")",")",">",">",">","factor_set1.add_factors","(","phi3",")",">",">",">","print","(","factor_set1",")","set","(","[","<","DiscreteFactor","representing","phi","(","x1:2",",","x2:3",",","x3:2",")","at","0x7f8e32b5b050",">",",","<","DiscreteFactor","representing","phi","(","x5:2",",","x6:2",",","x7:2",")","at","0x7f8e32b5b250",">",",","<","DiscreteFactor","representing","phi","(","x3:2",",","x4:2",",","x1:2",")","at","0x7f8e32b5b150",">","]",")",">",">",">","factor_set1.remove_factors","(","phi1",",","phi2",")",">",">",">","print","(","factor_set1",")","set","(","[","<","DiscreteFactor","representing","phi","(","x5:2",",","x6:2",",","x7:2",")","at","0x7f8e32b4cb10",">","]",")"]
code: def remove_factors(self, *factors):
      """
      Removes factors from the factor set.
  
      Parameters
      ----------
      factors: Factor1, Factor2, ...., Factorn
          factors to be removed from the 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_set1 = FactorSet(phi1, phi2)
      >>> phi3 = DiscreteFactor(['x5', 'x6', 'x7'], [2, 2, 2], range(8))
      >>> factor_set1.add_factors(phi3)
      >>> print(factor_set1)
      set([<DiscreteFactor representing phi(x1:2, x2:3, x3:2) at 0x7f8e32b5b050>,
           <DiscreteFactor representing phi(x5:2, x6:2, x7:2) at 0x7f8e32b5b250>,
           <DiscreteFactor representing phi(x3:2, x4:2, x1:2) at 0x7f8e32b5b150>])
      >>> factor_set1.remove_factors(phi1, phi2)
      >>> print(factor_set1)
      set([<DiscreteFactor representing phi(x5:2, x6:2, x7:2) at 0x7f8e32b4cb10>])
      """
      for factor in factors:
          self.factors.remove(factor)
  
file_path: pgmpy/pgmpy/factors/FactorSet.py
imports: from functools import reduce
  from pgmpy.factors.base import BaseFactor
label_desc: Use image node_id 3 for calling the FactorSet obj's underlying member method code with example usage: obj.remove_factors() without return types