class_docstr: Computes confidence-related statistics on the held-out validation dataset.
  
  TODO: regression & forecasting tasks
code: def analyze(
      self, info: Dict[str, object], **kwargs
  ) -> Dict[str, object]:
      ns = SimpleNamespace(**kwargs)
  
      if ns.is_classification:
          possible_labels = ns.stats_info.train_observed_classes
          self.ordenc.fit([[label] for label in possible_labels])
          task_type = "categorical"
      elif ns.is_multi_ts:
          task_type = "multi_ts"
      elif ns.is_numerical:
          task_type = "numerical"
      else:
          return info
  
      ces, ece, mce, gscore = self._get_stats(
          info["result_df"],
          ns.normal_predictions,
          ns.data,
          ns.target,
          task_type,
      )
      info["maximum_calibration_error"] = round(mce, self.n_decimals)
      info["expected_calibration_error"] = round(ece, self.n_decimals)
      info["binned_conf_acc_difference"] = ces
      info["global_calibration_score"] = round(gscore, self.n_decimals)
      return info
  
file_path: lightwood/lightwood/analysis/helpers/conf_stats.py
imports: from copy import deepcopy
  from typing import Dict
  from types import SimpleNamespace
  from sklearn.preprocessing import OrdinalEncoder
  from lightwood.analysis.base import BaseAnalysisBlock
label_desc: Use image node_id 2 for calling the ConfStats obj's underlying member method code with example usage: obj.analyze(info) and returns: info, info