class_docstr: Return the Predictive Power Score of image properties, in order to estimate their 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 to predict the label by an image property (e.g.
  brightness, contrast etc.).
  A high PPS (close to 1) can mean that there's a bias in the dataset, as a single property can predict the label
  successfully, using simple classic ML algorithms - meaning that a deep learning algorithm may accidentally learn
  these properties instead of more accurate complex abstractions.
  For example, in a classification dataset of wolves and dogs photographs, if only wolves are photographed in the
  snow, the brightness of the image may be used to predict the label "wolf" easily. In this case, a model might not
  learn to discern wolf from dog by the animal's characteristics, but by using the background color.
  
  For classification tasks, this check uses PPS to predict the class by image properties.
  For object detection tasks, this check uses PPS to predict the class of each bounding box, by the image properties
  of that specific bounding box.
  
  Uses the ppscore package - for more info, see https://github.com/8080labs/ppscore
  
  Parameters
  ----------
  image_properties : List[Dict[str, Any]], default: None
      List of properties. Replaces the default deepchecks properties.
      Each property is a dictionary with keys ``'name'`` (str), ``method`` (Callable) and ``'output_type'`` (str),
      representing attributes of said method. 'output_type' must be one of:
  
      - ``'numerical'`` - for continuous ordinal outputs.
      - ``'categorical'`` - for discrete, non-ordinal outputs. These can still be numbers,
        but these numbers do not have inherent value.
  
      For more on image / label properties, see the guide about :ref:`vision__properties_guide`.
  n_top_properties: int, default: 5
      Number of features to show, sorted by the magnitude of difference in PPS
  min_pps_to_show: float, default 0.05
          Minimum PPS to show a class in the graph
  ppscore_params: dict, default: None
      dictionary of additional parameters for the ppscore predictor function
  {additional_check_init_params:2*indent}
class_docstr_tok: ["Return","the","Predictive","Power","Score","of","image","properties",",","in","order","to","estimate","their","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","to","predict","the","label","by","an","image","property","(","e.g",".","brightness",",","contrast","etc.",")",".","A","high","PPS","(","close","to","1",")","can","mean","that","there","'s","a","bias","in","the","dataset",",","as","a","single","property","can","predict","the","label","successfully",",","using","simple","classic","ML","algorithms","-","meaning","that","a","deep","learning","algorithm","may","accidentally","learn","these","properties","instead","of","more","accurate","complex","abstractions",".","For","example",",","in","a","classification","dataset","of","wolves","and","dogs","photographs",",","if","only","wolves","are","photographed","in","the","snow",",","the","brightness","of","the","image","may","be","used","to","predict","the","label","``","wolf","''","easily",".","In","this","case",",","a","model","might","not","learn","to","discern","wolf","from","dog","by","the","animal","'s","characteristics",",","but","by","using","the","background","color",".","For","classification","tasks",",","this","check","uses","PPS","to","predict","the","class","by","image","properties",".","For","object","detection","tasks",",","this","check","uses","PPS","to","predict","the","class","of","each","bounding","box",",","by","the","image","properties","of","that","specific","bounding","box",".","Uses","the","ppscore","package","-","for","more","info",",","see","https",":","\/\/github.com\/8080labs\/ppscore","Parameters","--","--","--","--","--","image_properties",":","List","[","Dict","[","str",",","Any","]","]",",","default",":","None","List","of","properties",".","Replaces","the","default","deepchecks","properties",".","Each","property","is","a","dictionary","with","keys","``","'name","'","``","(","str",")",",","``","method","``","(","Callable",")","and","``","'output_type","'","``","(","str",")",",","representing","attributes","of","said","method",".","'output_type","'","must","be","one","of",":","-","``","'numerical","'","``","-","for","continuous","ordinal","outputs",".","-","``","'categorical","'","``","-","for","discrete",",","non-ordinal","outputs",".","These","can","still","be","numbers",",","but","these","numbers","do","not","have","inherent","value",".","For","more","on","image","\/","label","properties",",","see","the","guide","about",":","ref",":","`","vision__properties_guide","`",".","n_top_properties",":","int",",","default",":","5","Number","of","features","to","show",",","sorted","by","the","magnitude","of","difference","in","PPS","min_pps_to_show",":","float",",","default","0.05","Minimum","PPS","to","show","a","class","in","the","graph","ppscore_params",":","dict",",","default",":","None","dictionary","of","additional","parameters","for","the","ppscore","predictor","function","{","additional_check_init_params:2","*","indent","}"]
docstr: Add condition that will check that pps of the specified properties is less than the threshold.
  
  Parameters
  ----------
  threshold : float , default: 0.3
      pps upper bound
  Returns
  -------
  FLC
docstr_tok: ["Add","condition","that","will","check","that","pps","of","the","specified","properties","is","less","than","the","threshold",".","Parameters","--","--","--","--","--","threshold",":","float",",","default",":","0.3","pps","upper","bound","Returns","--","--","--","-","FLC"]
code: def add_condition_property_pps_less_than(
      self: PLC, threshold: float = 0.3
  ) -> PLC:
      """
      Add condition that will check that pps of the specified properties is less than the threshold.
  
      Parameters
      ----------
      threshold : float , default: 0.3
          pps upper bound
      Returns
      -------
      FLC
      """
  
      def condition(value: Dict[Hashable, float]) -> ConditionResult:
          failed_props = {
              prop_name: format_number(pps_value)
              for prop_name, pps_value in value.items()
              if pps_value >= threshold
          }
  
          if failed_props:
              message = (
                  f"Found {len(failed_props)} out of {len(value)} properties with PPS above threshold: "
                  f"{failed_props}"
              )
              return ConditionResult(ConditionCategory.FAIL, message)
          else:
              return ConditionResult(
                  ConditionCategory.PASS,
                  "Passed for all of the properties",
              )
  
      return self.add_condition(
          f"Properties' Predictive Power Score is less than {format_number(threshold)}",
          condition,
      )
  
file_path: deepchecks/deepchecks/vision/checks/data_integrity/property_label_correlation.py
imports: from collections import defaultdict
  from typing import Any, Dict, Hashable, List, Optional, TypeVar
  import pandas
  import deepchecks.ppscore
  from deepchecks.core import CheckResult, ConditionCategory, ConditionResult, DatasetKind
  from deepchecks.core.check_utils.feature_label_correlation_utils import get_pps_figure, pd_series_to_trace
  from deepchecks.utils.strings import format_number
  from deepchecks.vision._shared_docs import docstrings
  from deepchecks.vision.base_checks import SingleDatasetCheck
  from deepchecks.vision.context import Context
  from deepchecks.vision.utils.property_label_correlation_utils import calc_properties_for_property_label_correlation
  from deepchecks.vision.vision_data import TaskType
  from deepchecks.vision.vision_data.batch_wrapper import BatchWrapper
label_desc: Use image node_id 5 for calling the PropertyLabelCorrelation obj's underlying member method code with example usage: obj.add_condition_property_pps_less_than(threshold) and returns: self, ConditionResult, ConditionResult