class_docstr: Defines the top-level Model Analysis API.
  Use RAIInsights to analyze errors, explain the most important
  features, compute counterfactuals and run causal analysis in a
  single API.
class_docstr_tok: ["Defines","the","top-level","Model","Analysis","API",".","Use","RAIInsights","to","analyze","errors",",","explain","the","most","important","features",",","compute","counterfactuals","and","run","causal","analysis","in","a","single","API","."]
docstr: Initializes the managers.
  
  Initialized the causal, counterfactual, error analysis
  and explainer managers.
docstr_tok: ["Initializes","the","managers",".","Initialized","the","causal",",","counterfactual",",","error","analysis","and","explainer","managers","."]
code: def _initialize_managers(self):
      """Initializes the managers.
  
      Initialized the causal, counterfactual, error analysis
      and explainer managers.
      """
      if self.task_type == ModelTask.FORECASTING:
          self._managers = []
          return
  
      dropped_features = self._feature_metadata.dropped_features
      self._causal_manager = CausalManager(
          self.get_train_data(),
          self.get_test_data(),
          self.target_column,
          self.task_type,
          self.get_categorical_features_after_drop(),
          self._feature_metadata,
      )
  
      self._counterfactual_manager = CounterfactualManager(
          model=self.model,
          train=self.get_train_data(),
          test=self.get_test_data(),
          target_column=self.target_column,
          task_type=self.task_type,
          categorical_features=self.get_categorical_features_after_drop(),
      )
  
      self._data_balance_manager = DataBalanceManager(
          train=self.train,
          test=self.test,
          target_column=self.target_column,
          classes=self._classes,
          task_type=self.task_type,
      )
  
      self._error_analysis_manager = ErrorAnalysisManager(
          self.model,
          self.test,
          self.target_column,
          self._classes,
          categorical_features=self.categorical_features,
          dropped_features=dropped_features,
      )
  
      self._explainer_manager = ExplainerManager(
          self.model,
          self.get_train_data(),
          self.get_test_data(),
          self.target_column,
          self._classes,
          self.get_categorical_features_after_drop(),
      )
  
      self._managers = [
          self._causal_manager,
          self._counterfactual_manager,
          self._data_balance_manager,
          self._error_analysis_manager,
          self._explainer_manager,
      ]
  
imports: import json
  import pickle
  import warnings
  from enum import Enum
  from pathlib import Path
  from typing import Any, List, Optional, Union
  import numpy
  import pandas
  from erroranalysis._internal.cohort_filter import FilterDataWithCohortFilters
  from erroranalysis._internal.process_categoricals import process_categoricals
  from raiutils.data_processing import convert_to_list
  from raiutils.exceptions import SystemErrorException, UserConfigValidationException
  from raiutils.models import Forecasting, ModelTask, SKLearn
  from responsibleai._interfaces import Dataset, RAIInsightsData, TabularDatasetMetadata
  from responsibleai._internal._forecasting_wrappers import _wrap_model
  from responsibleai._internal.constants import FileFormats, ManagerNames, Metadata, SerializationAttributes
  from responsibleai.feature_metadata import FeatureMetadata
  from responsibleai.managers.causal_manager import CausalManager
  from responsibleai.managers.counterfactual_manager import CounterfactualManager
  from responsibleai.managers.data_balance_manager import DataBalanceManager
  from responsibleai.managers.error_analysis_manager import ErrorAnalysisManager
  from responsibleai.managers.explainer_manager import ExplainerManager
  from responsibleai.rai_insights.rai_base_insights import RAIBaseInsights
label_desc: Use image node_id 6 for calling the RAIInsights obj's underlying member method code with example usage: obj._initialize_managers() without return types