class_docstr: Manages issues related to out-of-distribution examples.
class_docstr_tok: ["Manages","issues","related","to","out-of-distribution","examples","."]
code: def find_issues(
      self,
      features: Optional[npt.NDArray] = None,
      pred_probs: Optional[np.ndarray] = None,
      **kwargs,
  ) -> None:
      knn_graph = self._process_knn_graph_from_inputs(kwargs)
      distances: Optional[np.ndarray] = None
  
      if knn_graph is not None:
          N = knn_graph.shape[0]
          k = knn_graph.nnz // N
          t = cast(int, self.ood.params["t"])
          distances = knn_graph.data.reshape(-1, k)
          assert isinstance(distances, np.ndarray)
          scores = transform_distances_to_scores(distances, k=k, t=t)
      elif features is not None:
          scores = self._score_with_features(features, **kwargs)
      elif pred_probs is not None:
          scores = self._score_with_pred_probs(pred_probs, **kwargs)
      else:
          if kwargs.get("knn_graph", None) is not None:
              raise ValueError(
                  "knn_graph is provided, but not sufficiently large to compute the scores based on the provided hyperparameters."
              )
          raise ValueError(
              f"Either features pred_probs must be provided."
          )
  
      if features is not None or knn_graph is not None:
          if knn_graph is None:
              assert (
                  features is not None
              ), "features must be provided so that we can compute the knn graph."
              knn_graph = self._process_knn_graph_from_features(kwargs)
          distances = knn_graph.data.reshape(knn_graph.shape[0], -1)
  
          assert isinstance(distances, np.ndarray)
          (
              self.threshold,
              is_issue_column,
          ) = self._compute_threshold_and_issue_column_from_distances(
              distances, self.threshold
          )
  
      else:
          assert pred_probs is not None
          # Threshold based on pred_probs, very small scores are outliers
          if self.threshold is None:
              self.threshold = self.DEFAULT_THRESHOLDS["pred_probs"]
          if not 0 <= self.threshold:
              raise ValueError(
                  f"threshold must be non-negative, but got {self.threshold}."
              )
          is_issue_column = scores < self.threshold * np.median(scores)
  
      self.issues = pd.DataFrame(
          {
              f"is_{self.issue_name}_issue": is_issue_column,
              self.issue_score_key: scores,
          },
      )
  
      self.summary = self.make_summary(score=scores.mean())
  
      self.info = self.collect_info(knn_graph=knn_graph)
  
file_path: cleanlab/cleanlab/datalab/internal/issue_manager/outlier.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Any, ClassVar, Dict, Optional, Tuple, Union, cast
  from scipy.sparse import csr_matrix
  from scipy.stats import iqr
  import numpy
  import pandas
  from cleanlab.datalab.internal.issue_manager import IssueManager
  from cleanlab.outlier import OutOfDistribution, transform_distances_to_scores
label_desc: Use image node_id 2 for calling the OutlierIssueManager obj's underlying member method code with example usage: obj.find_issues(features, pred_probs) without return types