class_docstr: A masker that is a combination of a masker and a model and outputs both masked args and the model's output.
      
docstr: Creates a masker from an underlying masker and and model.
  
  This masker returns the masked input along with the model output for the passed args.
  
  Parameters
  ----------
  masker: object
      An object of the shap.maskers.Masker base class (eg. Text/Image masker).
  
  model: object
      An object shap.models.Model base class used to generate output.
  
  Returns
  -------
  tuple
      A tuple consisting of the masked input using the underlying masker appended with the model output for passed args.
docstr_tok: ["Creates","a","masker","from","an","underlying","masker","and","and","model",".","This","masker","returns","the","masked","input","along","with","the","model","output","for","the","passed","args",".","Parameters","--","--","--","--","--","masker",":","object","An","object","of","the","shap.maskers.Masker","base","class","(","eg",".","Text\/Image","masker",")",".","model",":","object","An","object","shap.models.Model","base","class","used","to","generate","output",".","Returns","--","--","--","-","tuple","A","tuple","consisting","of","the","masked","input","using","the","underlying","masker","appended","with","the","model","output","for","passed","args","."]
code: def __init__(self, masker, model):
      """Creates a masker from an underlying masker and and model.
  
      This masker returns the masked input along with the model output for the passed args.
  
      Parameters
      ----------
      masker: object
          An object of the shap.maskers.Masker base class (eg. Text/Image masker).
  
      model: object
          An object shap.models.Model base class used to generate output.
  
      Returns
      -------
      tuple
          A tuple consisting of the masked input using the underlying masker appended with the model output for passed args.
      """
      self.masker = masker
      self.model = model
  
      # copy attributes from the masker we are wrapping
      masker_attributes = [
          "shape",
          "invariants",
          "clustering",
          "data_transform",
          "mask_shapes",
          "feature_names",
          "text_data",
          "image_data",
      ]
      for masker_attribute in masker_attributes:
          if getattr(self.masker, masker_attribute, None) is not None:
              setattr(
                  self,
                  masker_attribute,
                  getattr(self.masker, masker_attribute),
              )
  
file_path: shap/shap/maskers/_output_composite.py
imports: from .._serializable import Deserializer, Serializer
  from ._masker import Masker
label_desc: Use image node_id 1 to create a new OutputComposite object from inherited base classes: Masker with example: obj = OutputComposite(masker, model)