class_docstr: Summarize given model performance on the train and test datasets based on selected scorers.
  
  Parameters
  ----------
  scorers: Union[Mapping[str, Union[str, Callable]], List[str]], default: None
      Scorers to override the default scorers, find more about the supported formats at
      https://docs.deepchecks.com/stable/user-guide/general/metrics_guide.html
  n_samples : int , default: 1_000_000
      number of samples to use for this check.
  random_state : int, default: 42
      random seed for all check internals.
class_docstr_tok: ["Summarize","given","model","performance","on","the","train","and","test","datasets","based","on","selected","scorers",".","Parameters","--","--","--","--","--","scorers",":","Union","[","Mapping","[","str",",","Union","[","str",",","Callable","]","]",",","List","[","str","]","]",",","default",":","None","Scorers","to","override","the","default","scorers",",","find","more","about","the","supported","formats","at","https",":","\/\/docs.deepchecks.com\/stable\/user-guide\/general\/metrics_guide.html","n_samples",":","int",",","default",":","1_000_000","number","of","samples","to","use","for","this","check",".","random_state",":","int",",","default",":","42","random","seed","for","all","check","internals","."]
docstr: Add condition - the selected metrics scores are greater than the threshold.
  
  Parameters
  ----------
  threshold: float
      The threshold that the metrics result should be grater than.
  metrics: List[str]
      The names of the metrics from the check to apply the condition to. If None, runs on all the metrics that
      were calculated in the check.
  class_mode: str, default: 'all'
      The decision rule over the classes, one of 'any', 'all', class name. If 'any', passes if at least one class
      result is above the threshold, if 'all' passes if all the class results are above the threshold,
      class name, passes if the result for this specified class is above the threshold.
docstr_tok: ["Add","condition","-","the","selected","metrics","scores","are","greater","than","the","threshold",".","Parameters","--","--","--","--","--","threshold",":","float","The","threshold","that","the","metrics","result","should","be","grater","than",".","metrics",":","List","[","str","]","The","names","of","the","metrics","from","the","check","to","apply","the","condition","to",".","If","None",",","runs","on","all","the","metrics","that","were","calculated","in","the","check",".","class_mode",":","str",",","default",":","'all'","The","decision","rule","over","the","classes",",","one","of","'any","'",",","'all","'",",","class","name",".","If","'any","'",",","passes","if","at","least","one","class","result","is","above","the","threshold",",","if","'all","'","passes","if","all","the","class","results","are","above","the","threshold",",","class","name",",","passes","if","the","result","for","this","specified","class","is","above","the","threshold","."]
code: def add_condition_greater_than(
      self,
      threshold: float,
      metrics: List[str] = None,
      class_mode: str = "all",
  ) -> SDP:
      """Add condition - the selected metrics scores are greater than the threshold.
  
      Parameters
      ----------
      threshold: float
          The threshold that the metrics result should be grater than.
      metrics: List[str]
          The names of the metrics from the check to apply the condition to. If None, runs on all the metrics that
          were calculated in the check.
      class_mode: str, default: 'all'
          The decision rule over the classes, one of 'any', 'all', class name. If 'any', passes if at least one class
          result is above the threshold, if 'all' passes if all the class results are above the threshold,
          class name, passes if the result for this specified class is above the threshold.
      """
  
      def condition(check_result, metrics_to_check=metrics):
          metrics_to_check = (
              check_result["Metric"].unique()
              if metrics_to_check is None
              else metrics_to_check
          )
          metrics_pass = []
  
          for metric in metrics_to_check:
              if metric not in check_result.Metric.unique():
                  raise DeepchecksValueError(
                      f"The requested metric was not calculated, the metrics calculated in "
                      f"this check are: {check_result.Metric.unique()}."
                  )
              metric_result = check_result[
                  check_result["Metric"] == metric
              ]
              if class_mode == "all":
                  metrics_pass.append(
                      min(metric_result["Value"]) > threshold
                  )
              elif class_mode == "any":
                  metrics_pass.append(
                      max(metric_result["Value"]) > threshold
                  )
              elif str(class_mode) in [
                  str(x) for x in metric_result["Class"].unique()
              ]:
                  metrics_pass.append(
                      metric_result["Value"][class_mode] > threshold
                  )
              else:
                  raise DeepchecksValueError(
                      f"class_mode expected be one of the classes in the check results or any "
                      f"or all, received {class_mode}."
                  )
  
          if all(metrics_pass):
              return ConditionResult(
                  ConditionCategory.PASS,
                  "Passed for all of the metrics.",
              )
          else:
              failed_metrics = [
                  a
                  for a, b in zip(metrics_to_check, metrics_pass)
                  if not b
              ]
              return ConditionResult(
                  ConditionCategory.FAIL,
                  f"Failed for metrics: {failed_metrics}",
              )
  
      return self.add_condition(
          f"Selected metrics scores are greater than {format_number(threshold)}",
          condition,
      )
  
file_path: deepchecks/deepchecks/tabular/checks/model_evaluation/single_dataset_performance.py
imports: from numbers import Number
  from typing import TYPE_CHECKING, Callable, Dict, List, Mapping, Optional, TypeVar, Union, cast
  import pandas
  from deepchecks.core import CheckResult, ConditionCategory, ConditionResult
  from deepchecks.core.errors import DeepchecksValueError
  from deepchecks.core.reduce_classes import ReduceMetricClassMixin
  from deepchecks.tabular import Context
  from deepchecks.tabular.base_checks import SingleDatasetCheck
  from deepchecks.tabular.utils.task_type import TaskType
  from deepchecks.utils.docref import doclink
  from deepchecks.utils.strings import format_number
label_desc: Use image node_id 5 for calling the SingleDatasetPerformance obj's underlying member method code with example usage: obj.add_condition_greater_than(threshold, metrics, class_mode) and returns: self, ConditionResult, ConditionResult