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: Run check.
  
  Returns
  -------
  CheckResult
      value is a dictionary with PPS difference per feature column.
      data is a bar graph of the PPS of each feature.
  
  Raises
  ------
  DeepchecksValueError
      If the object is not a Dataset instance with a label.
docstr_tok: ["Run","check",".","Returns","--","--","--","-","CheckResult","value","is","a","dictionary","with","PPS","difference","per","feature","column",".","data","is","a","bar","graph","of","the","PPS","of","each","feature",".","Raises","--","--","--","DeepchecksValueError","If","the","object","is","not","a","Dataset","instance","with","a","label","."]
code: def run_logic(self, context: Context) -> CheckResult:
      """Run check.
  
      Returns
      -------
      CheckResult
          value is a dictionary with PPS difference per feature column.
          data is a bar graph of the PPS of each feature.
  
      Raises
      ------
      DeepchecksValueError
          If the object is not a Dataset instance with a label.
      """
      train_dataset = context.train.sample(
          self.n_samples, random_state=self.random_state
      )
      test_dataset = context.test.sample(
          self.n_samples, random_state=self.random_state
      )
  
      train_dataset.assert_features()
      relevant_columns = train_dataset.features + [
          train_dataset.label_name
      ]
  
      # ppscore infers the task type from the label dtype, so we need to convert it to object
      train_df = train_dataset.data[relevant_columns]
      test_df = test_dataset.data[relevant_columns]
      if context.task_type != TaskType.REGRESSION:
          train_df[train_dataset.label_name] = train_df[
              train_dataset.label_name
          ].astype(object)
          test_df[test_dataset.label_name] = test_df[
              test_dataset.label_name
          ].astype(object)
  
      text = [
          "The Predictive Power Score (PPS) is used to estimate the ability of a feature to predict the "
          f"label by itself. (Read more about {pps_html})"
          "",
          "<u>In the graph above</u>, we should suspect we have problems in our data if:",
          "" "1. <b>Train dataset PPS values are high</b>:",
          "Can indicate 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.",
          "2. <b>Large difference between train and test PPS</b> (train PPS is larger):",
          "   An even more powerful indication of data leakage, as a feature that was powerful in train but not in "
          "test ",
          "   can be explained by leakage in train that is not relevant to a new dataset.",
          "3. <b>Large difference between test and train PPS</b> (test PPS is larger):",
          "   An anomalous value, could indicate drift in test dataset that caused a coincidental correlation to "
          "the target label.",
      ]
  
      ret_value, display = get_feature_label_correlation(
          train_df,
          train_dataset.label_name,
          test_df,
          test_dataset.label_name,
          self.ppscore_params,
          self.n_top_features,
          min_pps_to_show=self.min_pps_to_show,
          random_state=self.random_state,
          with_display=context.with_display,
          dataset_names=(train_dataset.name, test_dataset.name),
      )
  
      if display:
          display += text
  
      return CheckResult(
          value=ret_value,
          display=display,
          header="Feature Label Correlation Change",
      )
  
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 2 for calling the FeatureLabelCorrelationChange obj's underlying member method code with example usage: obj.run_logic(context) and returns: CheckResult