class_docstr: BaseAnalyzer Class, used by ModelAnalyzer and PredictionsAnalyzer.
  
  BaseAnalyzer class is the common base class for the ModelAnalyzer
  and PredictionsAnalyzer classes.
  
  :param dataset:  A matrix of feature vector examples
      (# examples x # features).
  :type dataset: numpy.ndarray or list[][] or pandas.DataFrame
  :param true_y: The true labels for the provided dataset.
  :type true_y: numpy.ndarray or list[] or pandas.Series
  :param feature_names: Feature names.
  :type feature_names: numpy.ndarray or list[]
  :param categorical_features: The categorical feature names.
  :type categorical_features: list[str]
  :param model_task: Optional parameter to specify whether the model
      is a classification or regression model. In most cases, the
      type of the model can be inferred based on the shape of the
      output, where a classifier has a predict_proba method and
      outputs a 2 dimensional array, while a regressor has a
      predict method and outputs a 1 dimensional array.
  :type model_task: str
  :param metric: The metric name to evaluate at each tree node or
      heatmap grid.  Currently supported classification metrics
      include 'error_rate', 'recall_score' for binary
      classification and 'micro_recall_score' or
      'macro_recall_score' for multiclass classification,
      'precision_score' for binary classification and
      'micro_precision_score' or 'macro_precision_score'
      for multiclass classification, 'f1_score' for binary
      classification and 'micro_f1_score' or 'macro_f1_score'
      for multiclass classification, and 'accuracy_score'.
      Supported regression metrics include 'mean_absolute_error',
      'mean_squared_error', 'r2_score', and 'median_absolute_error'.
  :type metric: str
  :param classes: The class names.
  :type classes: numpy.ndarray or list[]
docstr: Compute the root all data statistics.
  
  :return: The computed root statistics.
  :rtype: dict
docstr_tok: ["Compute","the","root","all","data","statistics",".",":","return",":","The","computed","root","statistics",".",":","rtype",":","dict"]
code: def compute_root_stats(self):
      """Compute the root all data statistics.
  
      :return: The computed root statistics.
      :rtype: dict
      """
      if self.metric != Metrics.ERROR_RATE:
          metric_func = metric_to_func[self.metric]
          metric_value = metric_func(self.pred_y, self.true_y)
      else:
          total = len(self.true_y)
          if total == 0:
              metric_value = 0
          else:
              diff = self.get_diff()
              error = sum(diff)
              metric_value = (error / total) * 100
      metric_name = metric_to_display_name[self.metric]
      root_stats = {
          RootKeys.METRIC_NAME: metric_name,
          RootKeys.METRIC_VALUE: metric_value,
          RootKeys.TOTAL_SIZE: len(self.true_y),
          RootKeys.ERROR_COVERAGE: ROOT_COVERAGE,
      }
      return root_stats
  
imports: import logging
  from abc import ABC, abstractmethod
  import numpy
  import pandas
  from sklearn.feature_selection import mutual_info_classif, mutual_info_regression
  from erroranalysis._internal.constants import ErrorCorrelationMethods, MatrixParams, Metrics, ModelTask, RootKeys, metric_to_display_name
  from erroranalysis._internal.matrix_filter import compute_matrix
  from erroranalysis._internal.matrix_filter import compute_matrix_on_dataset
  from erroranalysis._internal.metrics import metric_to_func
  from erroranalysis._internal.process_categoricals import process_categoricals
  from erroranalysis._internal.surrogate_error_tree import compute_error_tree
  from erroranalysis._internal.surrogate_error_tree import compute_error_tree_on_dataset
  from erroranalysis._internal.utils import generate_random_unique_indexes
  from erroranalysis._internal.version_checker import check_pandas_version
  from erroranalysis.error_correlation_methods import compute_ebm_global_importance, compute_gbm_global_importance
  from erroranalysis.report import ErrorReport
label_desc: Use image node_id 20 for calling the BaseAnalyzer obj's underlying member method code with example usage: obj.compute_root_stats() and returns: root_stats