class_docstr: Defines the ExplainerManager for explaining a model.
class_docstr_tok: ["Defines","the","ExplainerManager","for","explaining","a","model","."]
docstr: Creates an ExplainerManager object.
  
  :param model: The model to explain.
      A model that implements sklearn.predict or sklearn.predict_proba
      or function that accepts a 2d ndarray.
  :type model: object
  :param initialization_examples: A matrix of feature vector
      examples (# examples x # features) for initializing the explainer,
      with an additional label column.
  :type initialization_examples: pandas.DataFrame
  :param evaluation_examples: A matrix of feature vector
      examples (# examples x # features) on which to explain the
      model's output, with an additional label column.
  :type evaluation_examples: pandas.DataFrame
  :param target_column: The name of the label column.
  :type target_column: str
  :param classes: Class names as a list of strings.
      The order of the class names should match that of the model
      output.  Only required if explaining classifier.
  :type classes: list
  :param categorical_features: The categorical feature names.
  :type categorical_features: list[str]
docstr_tok: ["Creates","an","ExplainerManager","object",".",":","param","model",":","The","model","to","explain",".","A","model","that","implements","sklearn.predict","or","sklearn.predict_proba","or","function","that","accepts","a","2d","ndarray",".",":","type","model",":","object",":","param","initialization_examples",":","A","matrix","of","feature","vector","examples","(","#","examples","x","#","features",")","for","initializing","the","explainer",",","with","an","additional","label","column",".",":","type","initialization_examples",":","pandas.DataFrame",":","param","evaluation_examples",":","A","matrix","of","feature","vector","examples","(","#","examples","x","#","features",")","on","which","to","explain","the","model","'s","output",",","with","an","additional","label","column",".",":","type","evaluation_examples",":","pandas.DataFrame",":","param","target_column",":","The","name","of","the","label","column",".",":","type","target_column",":","str",":","param","classes",":","Class","names","as","a","list","of","strings",".","The","order","of","the","class","names","should","match","that","of","the","model","output",".","Only","required","if","explaining","classifier",".",":","type","classes",":","list",":","param","categorical_features",":","The","categorical","feature","names",".",":","type","categorical_features",":","list","[","str","]"]
code: def __init__(
      self,
      model: Any,
      initialization_examples: pd.DataFrame,
      evaluation_examples: pd.DataFrame,
      target_column: str,
      classes: Optional[List] = None,
      categorical_features: Optional[List[str]] = None,
  ):
      """Creates an ExplainerManager object.
  
      :param model: The model to explain.
          A model that implements sklearn.predict or sklearn.predict_proba
          or function that accepts a 2d ndarray.
      :type model: object
      :param initialization_examples: A matrix of feature vector
          examples (# examples x # features) for initializing the explainer,
          with an additional label column.
      :type initialization_examples: pandas.DataFrame
      :param evaluation_examples: A matrix of feature vector
          examples (# examples x # features) on which to explain the
          model's output, with an additional label column.
      :type evaluation_examples: pandas.DataFrame
      :param target_column: The name of the label column.
      :type target_column: str
      :param classes: Class names as a list of strings.
          The order of the class names should match that of the model
          output.  Only required if explaining classifier.
      :type classes: list
      :param categorical_features: The categorical feature names.
      :type categorical_features: list[str]
      """
      self._model = model
      self._initialization_examples = initialization_examples.drop(
          columns=[target_column]
      )
      self._evaluation_examples = evaluation_examples.drop(
          columns=[target_column]
      )
      self._is_run = False
      self._is_added = False
      self._surrogate_model = None
      self._features = list(self._initialization_examples.columns)
      self._classes = classes
      self._target_column = target_column
      self._explanation = None
      self._categorical_features = categorical_features
  
imports: import json
  import warnings
  from pathlib import Path
  from typing import Any, List, Optional
  import numpy
  import pandas
  from interpret_community.explanation.explanation import FeatureImportanceExplanation, load_explanation, save_explanation
  from interpret_community.mimic.mimic_explainer import MimicExplainer
  from interpret_community.mimic.models.lightgbm_model import LGBMExplainableModel
  from interpret_community.mimic.models.linear_model import LinearExplainableModel
  from scipy.sparse import issparse
  from raiutils.data_processing import convert_to_list
  from raiutils.exceptions import UserConfigValidationException
  from raiutils.models import ModelTask
  from responsibleai._interfaces import EBMGlobalExplanation, FeatureImportance, ModelExplanationData, PrecomputedExplanations
  from responsibleai._internal.constants import ExplainerManagerKeys
  from responsibleai._internal.constants import ExplanationKeys, ListProperties, ManagerNames, Metadata
  from responsibleai._tools.shared.state_directory_management import DirectoryManager
  from responsibleai.managers.base_manager import BaseManager
  from responsibleai.utils import _find_features_having_missing_values, _measure_time
label_desc: Use image node_id 1 to create a new ExplainerManager object from inherited base classes: BaseManager with example: obj = ExplainerManager(model, initialization_examples, evaluation_examples, target_column, classes, categorical_features)