class_docstr: Return the Predictive Power Score of all features, in order to estimate each feature's ability to predict the label.
  
  The PPS represents the ability of a feature to single-handedly predict another feature or label.
  In this check, we specifically use it to assess the ability of each feature to predict the label.
  A high PPS (close to 1) can mean that this feature's success in predicting the label is actually due to data
  leakage - meaning that the feature holds information that is based on the label to begin with.
  
  When we compare train PPS to test PPS, A high difference can strongly indicate leakage,
  as a feature that was "powerful" in train but not in test can be explained by leakage in train that does
  not affect a new dataset.
  
  Uses the ppscore package - for more info, see https://github.com/8080labs/ppscore
  
  Parameters
  ----------
  ppscore_params : dict , default: None
      dictionary of additional parameters for the ppscore predictor function
  n_top_features : int , default: 5
      Number of features to show, sorted by the magnitude of difference in PPS
  n_samples : int , default: 100_000
      number of samples to use for this check.
  random_state : int , default: None
      Random state for the ppscore.predictors function
  min_pps_to_show: float, default 0.05
      Minimum PPS to show a class in the graph
class_docstr_tok: ["Return","the","Predictive","Power","Score","of","all","features",",","in","order","to","estimate","each","feature","'s","ability","to","predict","the","label",".","The","PPS","represents","the","ability","of","a","feature","to","single-handedly","predict","another","feature","or","label",".","In","this","check",",","we","specifically","use","it","to","assess","the","ability","of","each","feature","to","predict","the","label",".","A","high","PPS","(","close","to","1",")","can","mean","that","this","feature","'s","success","in","predicting","the","label","is","actually","due","to","data","leakage","-","meaning","that","the","feature","holds","information","that","is","based","on","the","label","to","begin","with",".","When","we","compare","train","PPS","to","test","PPS",",","A","high","difference","can","strongly","indicate","leakage",",","as","a","feature","that","was","``","powerful","''","in","train","but","not","in","test","can","be","explained","by","leakage","in","train","that","does","not","affect","a","new","dataset",".","Uses","the","ppscore","package","-","for","more","info",",","see","https",":","\/\/github.com\/8080labs\/ppscore","Parameters","--","--","--","--","--","ppscore_params",":","dict",",","default",":","None","dictionary","of","additional","parameters","for","the","ppscore","predictor","function","n_top_features",":","int",",","default",":","5","Number","of","features","to","show",",","sorted","by","the","magnitude","of","difference","in","PPS","n_samples",":","int",",","default",":","100_000","number","of","samples","to","use","for","this","check",".","random_state",":","int",",","default",":","None","Random","state","for","the","ppscore.predictors","function","min_pps_to_show",":","float",",","default","0.05","Minimum","PPS","to","show","a","class","in","the","graph"]
docstr: Add condition - difference between train dataset feature pps and test dataset feature pps is less than the        threshold.
  
  Parameters
  ----------
  threshold: float, default: 0.2
      train test pps difference upper bound.
  include_negative_diff: bool, default True
      This parameter decides whether the condition checks the absolute value of the difference, or just the
      positive value.
      The difference is calculated as train PPS minus test PPS. This is because we're interested in the case
      where the test dataset is less predictive of the label than the train dataset, as this could indicate
      leakage of labels into the train dataset.
docstr_tok: ["Add","condition","-","difference","between","train","dataset","feature","pps","and","test","dataset","feature","pps","is","less","than","the","threshold",".","Parameters","--","--","--","--","--","threshold",":","float",",","default",":","0.2","train","test","pps","difference","upper","bound",".","include_negative_diff",":","bool",",","default","True","This","parameter","decides","whether","the","condition","checks","the","absolute","value","of","the","difference",",","or","just","the","positive","value",".","The","difference","is","calculated","as","train","PPS","minus","test","PPS",".","This","is","because","we","'re","interested","in","the","case","where","the","test","dataset","is","less","predictive","of","the","label","than","the","train","dataset",",","as","this","could","indicate","leakage","of","labels","into","the","train","dataset","."]
code: def add_condition_feature_pps_difference_less_than(
      self: FLC,
      threshold: float = 0.2,
      include_negative_diff: bool = True,
  ) -> FLC:
      """Add condition - difference between train dataset feature pps and test dataset feature pps is less than the\
          threshold.
  
          Parameters
          ----------
          threshold: float, default: 0.2
              train test pps difference upper bound.
          include_negative_diff: bool, default True
              This parameter decides whether the condition checks the absolute value of the difference, or just the
              positive value.
              The difference is calculated as train PPS minus test PPS. This is because we're interested in the case
              where the test dataset is less predictive of the label than the train dataset, as this could indicate
              leakage of labels into the train dataset.
          """
  
      def condition(
          value: t.Dict[Hashable, t.Dict[Hashable, float]]
      ) -> ConditionResult:
          diff_dict = copy(value["train-test difference"])
          if include_negative_diff is True:
              diff_dict = {k: np.abs(v) for k, v in diff_dict.items()}
  
          failed_features = {
              feature_name: format_number(pps_diff)
              for feature_name, pps_diff in diff_dict.items()
              if pps_diff >= threshold
          }
  
          if failed_features:
              message = (
                  f"Found {len(failed_features)} out of {len(diff_dict)} features with PPS difference above "
                  f"threshold: {failed_features}"
              )
              return ConditionResult(ConditionCategory.FAIL, message)
          else:
              return ConditionResult(
                  ConditionCategory.PASS,
                  get_condition_passed_message(diff_dict),
              )
  
      return self.add_condition(
          f"Train-Test features' Predictive Power Score difference is less than "
          f"{format_number(threshold)}",
          condition,
      )
  
file_path: deepchecks/deepchecks/tabular/checks/train_test_validation/feature_label_correlation_change.py
imports: import typing
  from copy import copy
  import numpy
  from deepchecks.core import CheckResult, ConditionResult
  from deepchecks.core.check_utils.feature_label_correlation_utils import get_feature_label_correlation
  from deepchecks.core.condition import ConditionCategory
  from deepchecks.tabular import Context, TrainTestCheck
  from deepchecks.tabular.utils.messages import get_condition_passed_message
  from deepchecks.tabular.utils.task_type import TaskType
  from deepchecks.utils.strings import format_number
  from deepchecks.utils.typing import Hashable
label_desc: Use image node_id 3 for calling the FeatureLabelCorrelationChange obj's underlying member method code with example usage: obj.add_condition_feature_pps_difference_less_than(threshold, include_negative_diff) and returns: self, ConditionResult, ConditionResult