renate.shift.ks_detector module#
- class renate.shift.ks_detector.KolmogorovSmirnovCovariateShiftDetector(feature_extractor=None, batch_size=32, num_preprocessing_workers=0, device='cpu')[source]#
Bases:
ShiftDetectorWithFeatureExtractor
A Kolmogorov-Smirnov (KS) test on each feature.
A KS test is a univariate two-sample test, which we perform separately for each feature. To aggregate these tests without running into multiple-testing problems, we use a Bonferroni correction, as proposed in
Rabanser et al. Failing Loudly: An Empirical Study of Methods for Detecting Dataset Shift. NeurIPS 2019.