class_docstr: Base class for Noisy-Or models.
  
  This is an implementation of generalized Noisy-Or models and
  is not limited to Boolean variables and also any arbitrary
  function can be used instead of the boolean OR function.
  
  Reference: http://xenon.stanford.edu/~srinivas/research/6-UAI93-Srinivas-Generalization-of-Noisy-Or.pdf
docstr: Adds variables to the NoisyOrModel.
  
  Parameters
  ----------
  variables: list, tuple, dict (array like)
      array containing names of the variables that are to be added.
  
  cardinality: list, tuple, dict (array like)
      array containing integers representing the cardinality
      of the variables.
  
  inhibitor_probability: list, tuple, dict (array_like)
      array containing the inhibitor probabilities corresponding to each variable.
  
  Examples
  --------
  >>> from pgmpy.models import NoisyOrModel
  >>> model = NoisyOrModel(['x1', 'x2', 'x3'], [2, 3, 2], [[0.6, 0.4],
  ...                                                      [0.2, 0.4, 0.7],
  ...                                                      [0.1, 0., 4]])
  >>> model.add_variables(['x4'], [3], [0.1, 0.4, 0.2])
docstr_tok: ["Adds","variables","to","the","NoisyOrModel",".","Parameters","--","--","--","--","--","variables",":","list",",","tuple",",","dict","(","array","like",")","array","containing","names","of","the","variables","that","are","to","be","added",".","cardinality",":","list",",","tuple",",","dict","(","array","like",")","array","containing","integers","representing","the","cardinality","of","the","variables",".","inhibitor_probability",":","list",",","tuple",",","dict","(","array_like",")","array","containing","the","inhibitor","probabilities","corresponding","to","each","variable",".","Examples","--","--","--","--",">",">",">","from","pgmpy.models","import","NoisyOrModel",">",">",">","model","=","NoisyOrModel","(","[","'x1","'",",","'x2","'",",","'x3","'","]",",","[","2",",","3",",","2","]",",","[","[","0.6",",","0.4","]",",","...","[","0.2",",","0.4",",","0.7","]",",","...","[","0.1",",","0.",",","4","]","]",")",">",">",">","model.add_variables","(","[","'x4","'","]",",","[","3","]",",","[","0.1",",","0.4",",","0.2","]",")"]
code: def add_variables(
      self, variables, cardinality, inhibitor_probability
  ):
      """
      Adds variables to the NoisyOrModel.
  
      Parameters
      ----------
      variables: list, tuple, dict (array like)
          array containing names of the variables that are to be added.
  
      cardinality: list, tuple, dict (array like)
          array containing integers representing the cardinality
          of the variables.
  
      inhibitor_probability: list, tuple, dict (array_like)
          array containing the inhibitor probabilities corresponding to each variable.
  
      Examples
      --------
      >>> from pgmpy.models import NoisyOrModel
      >>> model = NoisyOrModel(['x1', 'x2', 'x3'], [2, 3, 2], [[0.6, 0.4],
      ...                                                      [0.2, 0.4, 0.7],
      ...                                                      [0.1, 0., 4]])
      >>> model.add_variables(['x4'], [3], [0.1, 0.4, 0.2])
      """
      if len(variables) == 1:
          if not isinstance(inhibitor_probability[0], (list, tuple)):
              inhibitor_probability = [inhibitor_probability]
  
      if len(variables) != len(cardinality):
          raise ValueError(
              "Size of variables and cardinality should be same"
          )
      elif any(
          cardinal != len(prob_array)
          for prob_array, cardinal in zip(
              inhibitor_probability, cardinality
          )
      ) or len(cardinality) != len(inhibitor_probability):
          raise ValueError(
              "Size of variables and inhibitor_probability should be same"
          )
      elif not all(
          0 <= item <= 1
          for item in chain.from_iterable(inhibitor_probability)
      ):
          raise ValueError(
              "Probability values should be between 0 and 1(both inclusive)."
          )
      else:
          self.variables = np.concatenate((self.variables, variables))
          self.cardinality = np.concatenate(
              (self.cardinality, cardinality)
          )
          self.inhibitor_probability.extend(inhibitor_probability)
  
imports: from itertools import chain
  import numpy
  import networkx
label_desc: Use image node_id 2 for calling the NoisyOrModel obj's underlying member method code with example usage: obj.add_variables(variables, cardinality, inhibitor_probability) without return types