class_docstr: Defines the top-level Model Analysis API.
  Use ModelAnalysis to analyze errors, explain the most important
  features, compute counterfactuals and run causal analysis in a
  single API.
docstr: Creates a ModelAnalysis object.
  
  :param model: The model to compute RAI insights for.
      A model that implements sklearn.predict or sklearn.predict_proba
      or function that accepts a 2d ndarray.
  :type model: object
  :param train: The training dataset including the label column.
  :type train: pandas.DataFrame
  :param test: The test dataset including the label column.
  :type test: pandas.DataFrame
  :param target_column: The name of the label column.
  :type target_column: str
  :param task_type: The task to run, can be `classification` or
      `regression`.
  :type task_type: str
  :param categorical_features: The categorical feature names.
  :type categorical_features: list[str]
  :param train_labels: The class labels in the training dataset
  :type train_labels: numpy.ndarray
  :param serializer: Picklable custom serializer with save and load
      methods defined for model that is not serializable. The save
      method returns a dictionary state and load method returns the
      model.
  :type serializer: object
  :param maximum_rows_for_test: Limit on size of test data
      (for performance reasons)
  :type maximum_rows_for_test: int
  :param feature_metadata: Feature metadata for the train/test
                           dataset to identify different kinds
                           of features in the dataset.
  :type feature_metadata: FeatureMetadata
docstr_tok: ["Creates","a","ModelAnalysis","object",".",":","param","model",":","The","model","to","compute","RAI","insights","for",".","A","model","that","implements","sklearn.predict","or","sklearn.predict_proba","or","function","that","accepts","a","2d","ndarray",".",":","type","model",":","object",":","param","train",":","The","training","dataset","including","the","label","column",".",":","type","train",":","pandas.DataFrame",":","param","test",":","The","test","dataset","including","the","label","column",".",":","type","test",":","pandas.DataFrame",":","param","target_column",":","The","name","of","the","label","column",".",":","type","target_column",":","str",":","param","task_type",":","The","task","to","run",",","can","be","`","classification","`","or","`","regression","`",".",":","type","task_type",":","str",":","param","categorical_features",":","The","categorical","feature","names",".",":","type","categorical_features",":","list","[","str","]",":","param","train_labels",":","The","class","labels","in","the","training","dataset",":","type","train_labels",":","numpy.ndarray",":","param","serializer",":","Picklable","custom","serializer","with","save","and","load","methods","defined","for","model","that","is","not","serializable",".","The","save","method","returns","a","dictionary","state","and","load","method","returns","the","model",".",":","type","serializer",":","object",":","param","maximum_rows_for_test",":","Limit","on","size","of","test","data","(","for","performance","reasons",")",":","type","maximum_rows_for_test",":","int",":","param","feature_metadata",":","Feature","metadata","for","the","train\/test","dataset","to","identify","different","kinds","of","features","in","the","dataset",".",":","type","feature_metadata",":","FeatureMetadata"]
code: def __init__(
      self,
      model: Any,
      train: pd.DataFrame,
      test: pd.DataFrame,
      target_column: str,
      task_type: str,
      categorical_features: Optional[List[str]] = None,
      train_labels: Optional[np.ndarray] = None,
      serializer: Optional[Any] = None,
      maximum_rows_for_test: int = 5000,
      feature_metadata: Optional[FeatureMetadata] = None,
  ):
      """Creates a ModelAnalysis object.
  
      :param model: The model to compute RAI insights for.
          A model that implements sklearn.predict or sklearn.predict_proba
          or function that accepts a 2d ndarray.
      :type model: object
      :param train: The training dataset including the label column.
      :type train: pandas.DataFrame
      :param test: The test dataset including the label column.
      :type test: pandas.DataFrame
      :param target_column: The name of the label column.
      :type target_column: str
      :param task_type: The task to run, can be `classification` or
          `regression`.
      :type task_type: str
      :param categorical_features: The categorical feature names.
      :type categorical_features: list[str]
      :param train_labels: The class labels in the training dataset
      :type train_labels: numpy.ndarray
      :param serializer: Picklable custom serializer with save and load
          methods defined for model that is not serializable. The save
          method returns a dictionary state and load method returns the
          model.
      :type serializer: object
      :param maximum_rows_for_test: Limit on size of test data
          (for performance reasons)
      :type maximum_rows_for_test: int
      :param feature_metadata: Feature metadata for the train/test
                               dataset to identify different kinds
                               of features in the dataset.
      :type feature_metadata: FeatureMetadata
      """
      warnings.warn(
          "MODULE-DEPRECATION-WARNING: ModelAnalysis in responsibleai "
          "package is deprecated. Please use RAIInsights instead.",
          DeprecationWarning,
      )
      self.rai_insights = RAIInsights(
          model,
          train,
          test,
          target_column,
          task_type,
          categorical_features=categorical_features,
          classes=train_labels,
          serializer=serializer,
          maximum_rows_for_test=maximum_rows_for_test,
          feature_metadata=feature_metadata,
      )
      self.model = self.rai_insights.model
      self.train = self.rai_insights.train
      self.test = self.rai_insights.test
      self.target_column = self.rai_insights.target_column
      self.task_type = self.rai_insights.task_type
      self.categorical_features = self.rai_insights.categorical_features
      self._feature_metadata = feature_metadata
  
imports: import warnings
  from typing import Any, List, Optional
  import numpy
  import pandas
  from responsibleai.feature_metadata import FeatureMetadata
  from responsibleai.managers.causal_manager import CausalManager
  from responsibleai.managers.counterfactual_manager import CounterfactualManager
  from responsibleai.managers.error_analysis_manager import ErrorAnalysisManager
  from responsibleai.managers.explainer_manager import ExplainerManager
  from responsibleai.rai_insights import RAIInsights
label_desc: Use image node_id 1 to create a new ModelAnalysis object from inherited base classes: object with example: obj = ModelAnalysis(model, train, test, target_column, task_type, categorical_features, train_labels, serializer, maximum_rows_for_test, feature_metadata)