class_docstr: Manages issues related to underperforming group examples.
  
  Note: The `min_cluster_samples` argument should not be confused with the
  `min_samples` argument of sklearn.cluster.DBSCAN.
  
  Examples
  --------
  >>> from cleanlab import Datalab
  >>> import numpy as np
  >>> X = np.random.normal(size=(50, 2))
  >>> y = np.random.randint(2, size=50)
  >>> pred_probs = X / X.sum(axis=1, keepdims=True)
  >>> data = {"X": X, "y": y}
  >>> lab = Datalab(data, label_name="y")
  >>> issue_types={"underperforming_group": {"clustering_kwargs": {"eps": 0.5}}}
  >>> lab.find_issues(pred_probs=pred_probs, features=X, issue_types=issue_types)
class_docstr_tok: ["Manages","issues","related","to","underperforming","group","examples",".","Note",":","The","`","min_cluster_samples","`","argument","should","not","be","confused","with","the","`","min_samples","`","argument","of","sklearn.cluster.DBSCAN",".","Examples","--","--","--","--",">",">",">","from","cleanlab","import","Datalab",">",">",">","import","numpy","as","np",">",">",">","X","=","np.random.normal","(","size=","(","50",",","2",")",")",">",">",">","y","=","np.random.randint","(","2",",","size=50",")",">",">",">","pred_probs","=","X","\/","X.sum","(","axis=1",",","keepdims=True",")",">",">",">","data","=","{","``","X","''",":","X",",","``","y","''",":","y","}",">",">",">","lab","=","Datalab","(","data",",","label_name=","''","y","''",")",">",">",">","issue_types=","{","``","underperforming_group","''",":","{","``","clustering_kwargs","''",":","{","``","eps","''",":","0.5","}","}","}",">",">",">","lab.find_issues","(","pred_probs=pred_probs",",","features=X",",","issue_types=issue_types",")"]
docstr: Get relevant cluster statistics.
  
  Args:
      n_clusters (int): Number of clusters
      cluster_ids (npt.NDArray[np.int_]): Cluster IDs for each datapoint.
      performed_clustering (bool): Set to True to indicate that clustering was performed on
      `features` passed to `find_issues`. Set to False to suggest that `cluster_ids` were explicitly
      passed to `find_issues`.
      worst_cluster_id (int): Uderperforming cluster ID.
  
  Returns:
      cluster_stats (Dict[str, Dict[str, Any]]): Cluster Statistics
docstr_tok: ["Get","relevant","cluster","statistics",".","Args",":","n_clusters","(","int",")",":","Number","of","clusters","cluster_ids","(","npt.NDArray","[","np.int_","]",")",":","Cluster","IDs","for","each","datapoint",".","performed_clustering","(","bool",")",":","Set","to","True","to","indicate","that","clustering","was","performed","on","`","features","`","passed","to","`","find_issues","`",".","Set","to","False","to","suggest","that","`","cluster_ids","`","were","explicitly","passed","to","`","find_issues","`",".","worst_cluster_id","(","int",")",":","Uderperforming","cluster","ID",".","Returns",":","cluster_stats","(","Dict","[","str",",","Dict","[","str",",","Any","]","]",")",":","Cluster","Statistics"]
code: def _get_cluster_statistics(
      self,
      n_clusters: int,
      cluster_ids: npt.NDArray[np.int_],
      performed_clustering: bool,
      worst_cluster_id: int,
  ) -> Dict[str, Dict[str, Any]]:
      """Get relevant cluster statistics.
  
      Args:
          n_clusters (int): Number of clusters
          cluster_ids (npt.NDArray[np.int_]): Cluster IDs for each datapoint.
          performed_clustering (bool): Set to True to indicate that clustering was performed on
          `features` passed to `find_issues`. Set to False to suggest that `cluster_ids` were explicitly
          passed to `find_issues`.
          worst_cluster_id (int): Uderperforming cluster ID.
  
      Returns:
          cluster_stats (Dict[str, Dict[str, Any]]): Cluster Statistics
      """
      cluster_stats: Dict[str, Dict[str, Any]] = {
          "clustering": {
              "algorithm": None,
              "params": {},
              "stats": {
                  "n_clusters": n_clusters,
                  "cluster_ids": cluster_ids,
                  "underperforming_cluster_id": worst_cluster_id,
              },
          }
      }
      if performed_clustering:
          cluster_stats["clustering"].update(
              {
                  "algorithm": CLUSTERING_ALGO,
                  "params": CLUSTERING_PARAMS_DEFAULT,
              }
          )
  
      return cluster_stats
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Any, ClassVar, Dict, Optional, Union, Tuple
  import warnings
  import inspect
  import numpy
  import pandas
  from scipy.sparse import csr_matrix
  from sklearn.neighbors import NearestNeighbors
  from sklearn.exceptions import NotFittedError
  from sklearn.utils.validation import check_is_fitted
  from sklearn.cluster import DBSCAN
  from cleanlab.datalab.internal.issue_manager import IssueManager
  from cleanlab.rank import get_self_confidence_for_each_label
label_desc: Use image node_id 10 for calling the UnderperformingGroupIssueManager obj's underlying member method code with example usage: obj._get_cluster_statistics(n_clusters, cluster_ids, performed_clustering, worst_cluster_id) and returns: cluster_stats