class_docstr: Uses the Partition SHAP method to explain the output of any function.
  
  Partition SHAP computes Shapley values recursively through a hierarchy of features, this
  hierarchy defines feature coalitions and results in the Owen values from game theory.
  
  The PartitionExplainer has two particularly nice properties:
  
  1) PartitionExplainer is model-agnostic but when using a balanced partition tree only has
     quadratic exact runtime (in term of the number of input features). This is in contrast to the
     exponential exact runtime of KernelExplainer or SamplingExplainer.
  2) PartitionExplainer always assigns to groups of correlated features the credit that set of features
     would have had if treated as a group. This means if the hierarchical clustering given to
     PartitionExplainer groups correlated features together, then feature correlations are
     "accounted for" in the sense that the total credit assigned to a group of tightly dependent features
     does not depend on how they behave if their correlation structure was broken during the explanation's
     perturbation process.
  Note that for linear models the Owen values that PartitionExplainer returns are the same as the standard
  non-hierarchical Shapley values.
class_docstr_tok: ["Uses","the","Partition","SHAP","method","to","explain","the","output","of","any","function",".","Partition","SHAP","computes","Shapley","values","recursively","through","a","hierarchy","of","features",",","this","hierarchy","defines","feature","coalitions","and","results","in","the","Owen","values","from","game","theory",".","The","PartitionExplainer","has","two","particularly","nice","properties",":","1",")","PartitionExplainer","is","model-agnostic","but","when","using","a","balanced","partition","tree","only","has","quadratic","exact","runtime","(","in","term","of","the","number","of","input","features",")",".","This","is","in","contrast","to","the","exponential","exact","runtime","of","KernelExplainer","or","SamplingExplainer",".","2",")","PartitionExplainer","always","assigns","to","groups","of","correlated","features","the","credit","that","set","of","features","would","have","had","if","treated","as","a","group",".","This","means","if","the","hierarchical","clustering","given","to","PartitionExplainer","groups","correlated","features","together",",","then","feature","correlations","are","``","accounted","for","''","in","the","sense","that","the","total","credit","assigned","to","a","group","of","tightly","dependent","features","does","not","depend","on","how","they","behave","if","their","correlation","structure","was","broken","during","the","explanation's","perturbation","process",".","Note","that","for","linear","models","the","Owen","values","that","PartitionExplainer","returns","are","the","same","as","the","standard","non-hierarchical","Shapley","values","."]
docstr: Explain the output of the model on the given arguments.
          
docstr_tok: ["Explain","the","output","of","the","model","on","the","given","arguments","."]
code: def __call__(
      self,
      *args,
      max_evals=500,
      fixed_context=None,
      main_effects=False,
      error_bounds=False,
      batch_size="auto",
      outputs=None,
      silent=False,
  ):
      """Explain the output of the model on the given arguments."""
      return super().__call__(
          *args,
          max_evals=max_evals,
          fixed_context=fixed_context,
          main_effects=main_effects,
          error_bounds=error_bounds,
          batch_size=batch_size,
          outputs=outputs,
          silent=silent,
      )
  
file_path: shap/shap/explainers/_partition.py
imports: import queue
  import time
  import numpy
  from numba import njit
  from tqdm.auto import tqdm
  from ..None import Explanation, links
  from ..models import Model
  from ..utils import MaskedModel, OpChain, make_masks, safe_isinstance
  from ._explainer import Explainer
label_desc: Use image node_id 2 for calling the PartitionExplainer obj's underlying member method code with example usage: obj.__call__() and returns: super