TrainTestLabelDrift¶
- class TrainTestLabelDrift[source]¶
Calculate label drift between train dataset and test dataset, using statistical measures.
Check calculates a drift score for the label in test dataset, by comparing its distribution to the train dataset. For numerical columns, we use the Earth Movers Distance. See https://en.wikipedia.org/wiki/Wasserstein_metric For categorical columns, we use the Population Stability Index (PSI). See https://www.lexjansen.com/wuss/2017/47_Final_Paper_PDF.pdf.
- Parameters
- max_num_categoriesint , default: 10
Only for categorical columns. Max number of allowed categories. If there are more, they are binned into an “Other” category. If max_num_categories=None, there is no limit. This limit applies for both drift calculation and for distribution plots.
- __new__(*args, **kwargs)¶
Methods
|
Add new condition function to the check. |
|
Add condition - require drift score to not be more than a certain threshold. |
Remove all conditions from this check instance. |
|
Run conditions on given result. |
|
Name of class in split camel case. |
|
|
Return parameters to show when printing the check. |
Remove given condition by index. |
|
|
Run check. |
|
Calculate drift for all columns. |