class_docstr: Calculate drift between the entire train and test datasets (based on image properties) using a trained model.
  
  Check fits a new model to distinguish between train and test datasets, called a Domain Classifier.
  The Domain Classifier is a tabular model, that cannot run on the images themselves. Therefore, the check calculates
  properties for each image (such as brightness, aspect ratio etc.) and uses them as input features to the Domain
  Classifier.
  Once the Domain Classifier is fitted the check calculates the feature importance for the domain classifier
  model. The result of the check is based on the AUC of the domain classifier model, and the check displays
  the change in distribution between train and test for the top features according to the
  calculated feature importance.
  
  Parameters
  ----------
  image_properties : List[Dict[str, Any]], default: None
      List of properties. Replaces the default deepchecks properties.
      Each property is 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 :doc:`/vision/usage_guides/vision_properties`
  n_top_properties : int , default: 3
      Amount of properties to show ordered by domain classifier feature importance. This limit is used together
      (AND) with min_feature_importance, so less than n_top_columns features can be displayed.
  min_feature_importance : float , default: 0.05
      Minimum feature importance to show in the check display. The features are the image properties that are given
      to the Domain Classifier as features to learn on.
      Feature importance sums to 1, so for example the default value of 0.05 means that all features with importance
      contributing less than 5% to the predictive power of the Domain Classifier won't be displayed. This limit is
      used together (AND) with n_top_columns, so features more important than min_feature_importance can be hidden.
  max_num_categories_for_display: int, default: 10
      Max number of categories to show in plot.
  show_categories_by: str, default: 'largest_difference'
      Specify which categories to show for categorical features' graphs, as the number of shown categories is limited
      by max_num_categories_for_display. Possible values:
  
      - 'train_largest': Show the largest train categories.
      - 'test_largest': Show the largest test categories.
      - 'largest_difference': Show the largest difference between categories.
  
  test_size : float , default: 0.3
      Fraction of the combined datasets to use for the evaluation of the domain classifier.
  min_meaningful_drift_score : float , default 0.05
      Minimum drift score for displaying drift in check. Under that score, check will display "nothing found".
  {additional_check_init_params:2*indent}
class_docstr_tok: ["Calculate","drift","between","the","entire","train","and","test","datasets","(","based","on","image","properties",")","using","a","trained","model",".","Check","fits","a","new","model","to","distinguish","between","train","and","test","datasets",",","called","a","Domain","Classifier",".","The","Domain","Classifier","is","a","tabular","model",",","that","can","not","run","on","the","images","themselves",".","Therefore",",","the","check","calculates","properties","for","each","image","(","such","as","brightness",",","aspect","ratio","etc",".",")","and","uses","them","as","input","features","to","the","Domain","Classifier",".","Once","the","Domain","Classifier","is","fitted","the","check","calculates","the","feature","importance","for","the","domain","classifier","model",".","The","result","of","the","check","is","based","on","the","AUC","of","the","domain","classifier","model",",","and","the","check","displays","the","change","in","distribution","between","train","and","test","for","the","top","features","according","to","the","calculated","feature","importance",".","Parameters","--","--","--","--","--","image_properties",":","List","[","Dict","[","str",",","Any","]","]",",","default",":","None","List","of","properties",".","Replaces","the","default","deepchecks","properties",".","Each","property","is","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",":","doc",":","`","\/vision\/usage_guides\/vision_properties","`","n_top_properties",":","int",",","default",":","3","Amount","of","properties","to","show","ordered","by","domain","classifier","feature","importance",".","This","limit","is","used","together","(","AND",")","with","min_feature_importance",",","so","less","than","n_top_columns","features","can","be","displayed",".","min_feature_importance",":","float",",","default",":","0.05","Minimum","feature","importance","to","show","in","the","check","display",".","The","features","are","the","image","properties","that","are","given","to","the","Domain","Classifier","as","features","to","learn","on",".","Feature","importance","sums","to","1",",","so","for","example","the","default","value","of","0.05","means","that","all","features","with","importance","contributing","less","than","5","%","to","the","predictive","power","of","the","Domain","Classifier","wo","n't","be","displayed",".","This","limit","is","used","together","(","AND",")","with","n_top_columns",",","so","features","more","important","than","min_feature_importance","can","be","hidden",".","max_num_categories_for_display",":","int",",","default",":","10","Max","number","of","categories","to","show","in","plot",".","show_categories_by",":","str",",","default",":","'largest_difference'","Specify","which","categories","to","show","for","categorical","features","'","graphs",",","as","the","number","of","shown","categories","is","limited","by","max_num_categories_for_display",".","Possible","values",":","-","'train_largest","'",":","Show","the","largest","train","categories",".","-","'test_largest","'",":","Show","the","largest","test","categories",".","-","'largest_difference","'",":","Show","the","largest","difference","between","categories",".","test_size",":","float",",","default",":","0.3","Fraction","of","the","combined","datasets","to","use","for","the","evaluation","of","the","domain","classifier",".","min_meaningful_drift_score",":","float",",","default","0.05","Minimum","drift","score","for","displaying","drift","in","check",".","Under","that","score",",","check","will","display","``","nothing","found","''",".","{","additional_check_init_params:2","*","indent","}"]
docstr: Add condition - require drift score to be less than the threshold.
  
  The drift score used here is the domain_classifier_drift_Score attribute of the check result.
  
  Parameters
  ----------
  threshold: float , default: 0.1
      The max threshold for the drift score.
docstr_tok: ["Add","condition","-","require","drift","score","to","be","less","than","the","threshold",".","The","drift","score","used","here","is","the","domain_classifier_drift_Score","attribute","of","the","check","result",".","Parameters","--","--","--","--","--","threshold",":","float",",","default",":","0.1","The","max","threshold","for","the","drift","score","."]
code: def add_condition_drift_score_less_than(self, threshold: float = 0.1):
      """
      Add condition - require drift score to be less than the threshold.
  
      The drift score used here is the domain_classifier_drift_Score attribute of the check result.
  
      Parameters
      ----------
      threshold: float , default: 0.1
          The max threshold for the drift score.
      """
  
      def condition(result):
          drift_score = result["domain_classifier_drift_score"]
          if drift_score < threshold:
              return ConditionResult(
                  ConditionCategory.PASS,
                  f"Drift score {format_number(drift_score, 3)} is less than "
                  f"{format_number(threshold)}",
              )
          else:
              return ConditionResult(
                  ConditionCategory.FAIL,
                  f"Drift score {format_number(drift_score, 3)} is not less than "
                  f"{format_number(threshold)}",
              )
  
      return self.add_condition(
          f"Drift score is less than {threshold}", condition
      )
  
file_path: deepchecks/deepchecks/vision/checks/train_test_validation/image_dataset_drift.py
imports: from collections import defaultdict
  from typing import Any, Dict, List, Optional
  import pandas
  from deepchecks.core import CheckResult, ConditionCategory, ConditionResult, DatasetKind
  from deepchecks.core.check_utils.multivariate_drift_utils import run_multivariable_drift
  from deepchecks.utils.strings import format_number
  from deepchecks.vision._shared_docs import docstrings
  from deepchecks.vision.base_checks import TrainTestCheck
  from deepchecks.vision.context import Context
  from deepchecks.vision.utils.image_properties import default_image_properties
  from deepchecks.vision.utils.vision_properties import PropertiesInputType
  from deepchecks.vision.vision_data.batch_wrapper import BatchWrapper
label_desc: Use image node_id 5 for calling the ImageDatasetDrift obj's underlying member method code with example usage: obj.add_condition_drift_score_less_than(threshold) and returns: self, ConditionResult, ConditionResult