class_docstr: Base class for label drift checks.
class_docstr_tok: ["Base","class","for","label","drift","checks","."]
docstr: Add condition - require drift score to be less than the threshold.
  
  The industry standard for PSI limit is above 0.2.
  There are no common industry standards for other drift methods, such as Cramer's V,
  Kolmogorov-Smirnov and Earth Mover's Distance.
  
  Parameters
  ----------
  max_allowed_drift_score: float , default: 0.15
      the max threshold for the categorical variable drift score
  Returns
  -------
  ConditionResult
      False if any column has passed the max threshold, True otherwise
docstr_tok: ["Add","condition","-","require","drift","score","to","be","less","than","the","threshold",".","The","industry","standard","for","PSI","limit","is","above","0.2",".","There","are","no","common","industry","standards","for","other","drift","methods",",","such","as","Cramer","'s","V",",","Kolmogorov-Smirnov","and","Earth","Mover","'s","Distance",".","Parameters","--","--","--","--","--","max_allowed_drift_score",":","float",",","default",":","0.15","the","max","threshold","for","the","categorical","variable","drift","score","Returns","--","--","--","-","ConditionResult","False","if","any","column","has","passed","the","max","threshold",",","True","otherwise"]
code: def add_condition_drift_score_less_than(
      self, max_allowed_drift_score: float = 0.15
  ) -> Self:
      """
      Add condition - require drift score to be less than the threshold.
  
      The industry standard for PSI limit is above 0.2.
      There are no common industry standards for other drift methods, such as Cramer's V,
      Kolmogorov-Smirnov and Earth Mover's Distance.
  
      Parameters
      ----------
      max_allowed_drift_score: float , default: 0.15
          the max threshold for the categorical variable drift score
      Returns
      -------
      ConditionResult
          False if any column has passed the max threshold, True otherwise
      """
  
      def condition(result: t.Dict) -> ConditionResult:
          drift_score = result["Drift score"]
          method = result["Method"]
  
          details = f"Label's drift score {method} is {format_number(drift_score)}"
          category = (
              ConditionCategory.FAIL
              if drift_score > max_allowed_drift_score
              else ConditionCategory.PASS
          )
          return ConditionResult(category, details)
  
      return self.add_condition(
          f"Label drift score < {max_allowed_drift_score}", condition
      )
  
file_path: deepchecks/deepchecks/utils/abstracts/label_drift.py
imports: import abc
  import typing
  import pandas
  from typing_extensions import Self
  from deepchecks import CheckResult, ConditionCategory, ConditionResult
  from deepchecks.utils.distribution.drift import calc_drift_and_plot, get_drift_plot_sidenote
  from deepchecks.utils.strings import format_number
label_desc: Use image node_id 2 for calling the LabelDriftAbstract obj's underlying member method code with example usage: obj.add_condition_drift_score_less_than(max_allowed_drift_score) and returns: self, ConditionResult