class_docstr: This method approximates the Shapley values by iterating through permutations of the inputs.
  
  This is a model agnostic explainer that guarantees local accuracy (additivity) by iterating completely
  through an entire permutation of the features in both forward and reverse directions (antithetic sampling).
  If we do this once, then we get the exact SHAP values for models with up to second order interaction effects.
  We can iterate this many times over many random permutations to get better SHAP value estimates for models
  with higher order interactions. This sequential ordering formulation also allows for easy reuse of
  model evaluations and the ability to efficiently avoid evaluating the model when the background values
  for a feature are the same as the current input value. We can also account for hierarchical data
  structures with partition trees, something not currently implemented for KernalExplainer or SamplingExplainer.
class_docstr_tok: ["This","method","approximates","the","Shapley","values","by","iterating","through","permutations","of","the","inputs",".","This","is","a","model","agnostic","explainer","that","guarantees","local","accuracy","(","additivity",")","by","iterating","completely","through","an","entire","permutation","of","the","features","in","both","forward","and","reverse","directions","(","antithetic","sampling",")",".","If","we","do","this","once",",","then","we","get","the","exact","SHAP","values","for","models","with","up","to","second","order","interaction","effects",".","We","can","iterate","this","many","times","over","many","random","permutations","to","get","better","SHAP","value","estimates","for","models","with","higher","order","interactions",".","This","sequential","ordering","formulation","also","allows","for","easy","reuse","of","model","evaluations","and","the","ability","to","efficiently","avoid","evaluating","the","model","when","the","background","values","for","a","feature","are","the","same","as","the","current","input","value",".","We","can","also","account","for","hierarchical","data","structures","with","partition","trees",",","something","not","currently","implemented","for","KernalExplainer","or","SamplingExplainer","."]
code: def __str__(self):
      return "shap.explainers.PermutationExplainer()"
  
file_path: shap/shap/explainers/_permutation.py
imports: import warnings
  import numpy
  from ..None import links
  from ..models import Model
  from ..utils import MaskedModel, partition_tree_shuffle
  from ._explainer import Explainer
label_desc: Use image node_id 5 for calling the PermutationExplainer obj's underlying member method code with example usage: obj.__str__() and returns: str