class_docstr: Defines the CounterfactualManager for generating counterfactuals
  from a model.
class_docstr_tok: ["Defines","the","CounterfactualManager","for","generating","counterfactuals","from","a","model","."]
docstr: Creates a CounterfactualManager object.
  
  :param model: The model to generate counterfactuals from.
      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.
  :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.
  :type evaluation_examples: pandas.DataFrame
  :param target_column: The name of the label column.
  :type target_column: str
  :param task_type: Task type is either 'classification/regression'
  :type task_type: str
  :param categorical_features: The categorical feature names.
  :type categorical_features: list[str]
code: def __init__(
      self,
      model: Any,
      train: pd.DataFrame,
      test: pd.DataFrame,
      target_column: str,
      task_type: str,
      categorical_features: List[str],
  ):
      """Creates a CounterfactualManager object.
  
      :param model: The model to generate counterfactuals from.
          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.
      :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.
      :type evaluation_examples: pandas.DataFrame
      :param target_column: The name of the label column.
      :type target_column: str
      :param task_type: Task type is either 'classification/regression'
      :type task_type: str
      :param categorical_features: The categorical feature names.
      :type categorical_features: list[str]
      """
      self._model = model
      self._train = train
      self._test = test
      self._target_column = target_column
      self._task_type = task_type
      self._categorical_features = categorical_features
      self._counterfactual_config_list = []
  
imports: import json
  import uuid
  import warnings
  from pathlib import Path
  from typing import Any, List, Optional, Union
  import dice_ml
  import jsonschema
  import numpy
  import pandas
  from dice_ml import Dice
  from dice_ml.counterfactual_explanations import CounterfactualExplanations
  from dice_ml.explainer_interfaces.explainer_base import ExplainerBase
  from raiutils.exceptions import UserConfigValidationException
  from raiutils.models import ModelTask
  from responsibleai._config.base_config import BaseConfig
  from responsibleai._data_validations import validate_train_test_categories
  from responsibleai._interfaces import CounterfactualData
  from responsibleai._internal.constants import CounterfactualManagerKeys, FileFormats, ListProperties, ManagerNames
  from responsibleai._tools.shared.state_directory_management import DirectoryManager
  from responsibleai.exceptions import DuplicateManagerConfigException, SchemaErrorException
  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 CounterfactualManager object from inherited base classes: BaseManager with example: obj = CounterfactualManager(model, train, test, target_column, task_type, categorical_features)