From 8d66af10227d0c54363e5737683e3c1bff914a44 Mon Sep 17 00:00:00 2001 From: Jose Caloca <59198442+josecaloca@users.noreply.github.com> Date: Wed, 25 Sep 2024 08:25:23 +0200 Subject: [PATCH] fix: remove incorrect ConstantThreshold from UnivariateDriftCalculator docstring Updated the UnivariateDriftCalculator docstring by removing ConstantThreshold(upper=0.1) as it incorrectly reflects the default behavior. The correct default is StandardDeviationThreshold(std_lower_multiplier=None). --- nannyml/drift/univariate/calculator.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nannyml/drift/univariate/calculator.py b/nannyml/drift/univariate/calculator.py index 40629597..fcc5fad2 100644 --- a/nannyml/drift/univariate/calculator.py +++ b/nannyml/drift/univariate/calculator.py @@ -118,10 +118,10 @@ def __init__( { 'kolmogorov_smirnov': StandardDeviationThreshold(std_lower_multiplier=None), - 'jensen_shannon': ConstantThreshold(upper=0.1), + 'jensen_shannon': StandardDeviationThreshold(std_lower_multiplier=None), 'wasserstein': StandardDeviationThreshold(std_lower_multiplier=None), - 'hellinger': ConstantThreshold(upper=0.1), - 'l_infinity': ConstantThreshold(upper=0.1) + 'hellinger': StandardDeviationThreshold(std_lower_multiplier=None), + 'l_infinity': StandardDeviationThreshold(std_lower_multiplier=None), } A dictionary allowing users to set a custom threshold for each method. It links a `Threshold` subclass @@ -130,10 +130,10 @@ def __init__( will be applied. The default method thresholds are as follows: - `kolmogorov_smirnov`: `StandardDeviationThreshold(std_lower_multiplier=None)` - - `jensen_shannon`: `ConstantThreshold(upper=0.1)` + - `jensen_shannon`: `StandardDeviationThreshold(std_lower_multiplier=None)` - `wasserstein`: `StandardDeviationThreshold(std_lower_multiplier=None)` - - `hellinger`: `ConstantThreshold(upper=0.1)` - - `l_infinity`: `ConstantThreshold(upper=0.1)` + - `hellinger`: `StandardDeviationThreshold(std_lower_multiplier=None)` + - `l_infinity`: `StandardDeviationThreshold(std_lower_multiplier=None)` The `chi2` method does not support custom thresholds for now. Additional research is required to determine how to transition from its current p-value based implementation.