TrainTestFeatureDrift.add_condition_drift_score_less_than#
- TrainTestFeatureDrift.add_condition_drift_score_less_than(max_allowed_categorical_score: float = 0.2, max_allowed_numeric_score: float = 0.1, allowed_num_features_exceeding_threshold: int = 0, max_allowed_psi_score: Optional[float] = None, max_allowed_earth_movers_score: Optional[float] = None)[source]#
Add condition - require drift score to be less than the threshold.
The industry standard for PSI limit is above 0.2. Cramer’s V does not have a common industry standard. Earth movers does not have a common industry standard.
- Parameters
- max_allowed_categorical_score: float , default: 0.2
The max threshold for the categorical variable drift score
- max_allowed_numeric_score: float , default: 0.1
The max threshold for the numeric variable drift score
- allowed_num_features_exceeding_threshold: int , default: 0
Determines the number of features with drift score above threshold needed to fail the condition.
- max_allowed_psi_score: float, default None
Deprecated. Please use max_allowed_categorical_score instead
- max_allowed_earth_movers_score: float, default None
Deprecated. Please use max_allowed_numeric_score instead
- Returns
- ConditionResult
False if more than allowed_num_features_exceeding_threshold drift scores are above threshold, True otherwise