code: def health_summary(
      labels=None,
      pred_probs=None,
      *,
      asymmetric=False,
      class_names=None,
      num_examples=None,
      joint=None,
      confident_joint=None,
      multi_label=False,
      verbose=True,
  ) -> dict:
      """Prints a health summary of your dataset.
  
      This summary includes useful statistics like:
  
      * The classes with the most and least label issues.
      * Classes that overlap and could potentially be merged.
      * Overall label quality scores, summarizing how accurate the labels appear overall.
  
      This method works by providing any one (and only one) of the following inputs:
  
      1. ``labels`` and ``pred_probs``, or
      2. ``joint`` and ``num_examples``, or
      3. ``confident_joint``
  
      Only provide **exactly one of the above input options**, do not provide a combination.
  
      Examples
      --------
      >>> from cleanlab.dataset import health_summary
      >>> from sklearn.linear_model import LogisticRegression
      >>> from sklearn.model_selection import cross_val_predict
      >>> data, labels = get_data_labels_from_dataset()
      >>> yourFavoriteModel = LogisticRegression()
      >>> pred_probs = cross_val_predict(yourFavoriteModel, data, labels, cv=3, method="predict_proba")
      >>> summary = health_summary(labels=labels, pred_probs=pred_probs)  # doctest: +SKIP
  
      **Parameters**: For parameter info, see the docstring of `~cleanlab.dataset.find_overlapping_classes`.
  
      Returns
      -------
      summary : dict
          A dictionary containing keys (see the corresponding functions' documentation to understand the values):
  
          - ``"overall_label_health_score"``, corresponding to `~cleanlab.dataset.overall_label_health_score`
          - ``"joint"``, corresponding to :py:func:`count.estimate_joint <cleanlab.count.estimate_joint>`
          - ``"classes_by_label_quality"``, corresponding to `~cleanlab.dataset.rank_classes_by_label_quality`
          - ``"overlapping_classes"``, corresponding to `~cleanlab.dataset.find_overlapping_classes`
      """
      from cleanlab.internal.util import smart_display_dataframe
  
      if multi_label:
          raise ValueError(
              "For multilabel data, please call multilabel_classification.dataset.health_summary"
          )
      if joint is None:
          joint = estimate_joint(
              labels=labels,
              pred_probs=pred_probs,
              confident_joint=confident_joint,
          )
      if num_examples is None:
          num_examples = _get_num_examples(labels=labels)
  
      if verbose:
          longest_line = (
              f"|   for your dataset with {num_examples:,} examples "
              f"and {len(joint):,} classes.  |\n"
          )
          print(
              "-" * (len(longest_line) - 1)
              + "\n"
              + f"|  Generating a Cleanlab Dataset Health Summary{' ' * (len(longest_line) - 49)}|\n"
              + longest_line
              + f"|  Note, Cleanlab is not a medical doctor... yet.{' ' * (len(longest_line) - 51)}|\n"
              + "-" * (len(longest_line) - 1)
              + "\n",
          )
  
      df_class_label_quality = rank_classes_by_label_quality(
          labels=labels,
          pred_probs=pred_probs,
          class_names=class_names,
          num_examples=num_examples,
          joint=joint,
          confident_joint=confident_joint,
      )
      if verbose:
          print(
              "Overall Class Quality and Noise across your dataset (below)"
          )
          print("-" * 60, "\n", flush=True)
          smart_display_dataframe(df_class_label_quality)
  
      df_overlapping_classes = find_overlapping_classes(
          labels=labels,
          pred_probs=pred_probs,
          asymmetric=asymmetric,
          class_names=class_names,
          num_examples=num_examples,
          joint=joint,
          confident_joint=confident_joint,
      )
      if verbose:
          print(
              "\nClass Overlap. In some cases, you may want to merge classes in the top rows (below)"
              + "\n"
              + "-" * 83
              + "\n",
              flush=True,
          )
          smart_display_dataframe(df_overlapping_classes)
          print()
  
      health_score = overall_label_health_score(
          labels=labels,
          pred_probs=pred_probs,
          num_examples=num_examples,
          confident_joint=confident_joint,
          verbose=verbose,
      )
      if verbose:
          print("\nGenerated with <3 from Cleanlab.\n")
      return {
          "overall_label_health_score": health_score,
          "joint": joint,
          "classes_by_label_quality": df_class_label_quality,
          "overlapping_classes": df_overlapping_classes,
      }
  
file_path: cleanlab/cleanlab/dataset.py
imports: from typing import Optional, cast
  import numpy
  import pandas
  from cleanlab.count import estimate_joint, num_label_issues
label_desc: Use image node_id 4 for calling a global function with example usage: health_summary(labels, pred_probs) and returns: dict