Skip to content

Commit

Permalink
Updated default thresholds for Univariate Drift detection methods
Browse files Browse the repository at this point in the history
  • Loading branch information
nnansters committed Jan 17, 2024
1 parent aad7edf commit 7af91f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 21 deletions.
19 changes: 2 additions & 17 deletions docs/tutorials/thresholds.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ have the following default threshold:
nml.thresholds.StandardDeviationThreshold(std_lower_multiplier=3, std_upper_multiplier=3, offset_from=np.mean)
Some drift detection methods and the unseen values data quality metric are exceptions to this rule.
They have default thresholds more attuned to their specific role and properties:
The unseen values data quality metric is an exception to this rule.
It ahs default thresholds more attuned to its specific role and properties:

.. list-table::
:widths: 25, 25, 50
Expand All @@ -180,24 +180,9 @@ They have default thresholds more attuned to their specific role and properties:
* - Module
- Functionality
- Default threshold
* - Univariate Drift
- `jensen_shannon`
- ``ConstantThreshold(upper=0.1)``
* - Univariate Drift
- `hellinger`
- ``ConstantThreshold(upper=0.1)``
* - Univariate Drift
- `l_infinity`
- ``ConstantThreshold(upper=0.1)``
* - Data Quality
- Unseen Values Calculator
- ``ConstantThreshold(lower=None, upper=0)``
* - Data Quality
- Missing Values Calculator
- ``StandardDeviationThreshold()``
* - Summary Stats
- all calculators
- ``StandardDeviationThreshold()``


What's next?
Expand Down
8 changes: 4 additions & 4 deletions nannyml/drift/univariate/calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@

DEFAULT_THRESHOLDS: Dict[str, Threshold] = {
'kolmogorov_smirnov': StandardDeviationThreshold(std_lower_multiplier=None),
'chi2': StandardDeviationThreshold(), # currently ignored
'jensen_shannon': ConstantThreshold(lower=None, upper=0.1),
'chi2': StandardDeviationThreshold(std_lower_multiplier=None), # currently ignored
'jensen_shannon': StandardDeviationThreshold(std_lower_multiplier=None),
'wasserstein': StandardDeviationThreshold(std_lower_multiplier=None),
'hellinger': ConstantThreshold(lower=None, upper=0.1),
'l_infinity': ConstantThreshold(lower=None, upper=0.1),
'hellinger': StandardDeviationThreshold(std_lower_multiplier=None),
'l_infinity': StandardDeviationThreshold(std_lower_multiplier=None),
}


Expand Down

0 comments on commit 7af91f1

Please sign in to comment.