class_docstr: A masker that outputs both the masked data and the original data as a pair.
      
docstr: Creates a Composite masker from an underlying masker and returns the original args along with the masked output.
  
  Parameters
  ----------
  masker: object
      An object of the shap.maskers.Masker base class (eg. Text/Image masker).
  
  Returns
  -------
  tuple
      A tuple consisting of the masked input using the underlying masker appended with the original args in a list.
docstr_tok: ["Creates","a","Composite","masker","from","an","underlying","masker","and","returns","the","original","args","along","with","the","masked","output",".","Parameters","--","--","--","--","--","masker",":","object","An","object","of","the","shap.maskers.Masker","base","class","(","eg",".","Text\/Image","masker",")",".","Returns","--","--","--","-","tuple","A","tuple","consisting","of","the","masked","input","using","the","underlying","masker","appended","with","the","original","args","in","a","list","."]
code: def __init__(self, masker):
      """Creates a Composite masker from an underlying masker and returns the original args along with the masked output.
  
      Parameters
      ----------
      masker: object
          An object of the shap.maskers.Masker base class (eg. Text/Image masker).
  
      Returns
      -------
      tuple
          A tuple consisting of the masked input using the underlying masker appended with the original args in a list.
      """
      self.masker = masker
  
      # 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/_fixed_composite.py
imports: import numpy
  from .._serializable import Deserializer, Serializer
  from ._masker import Masker
label_desc: Use image node_id 1 to create a new FixedComposite object from inherited base classes: Masker with example: obj = FixedComposite(masker)