redflag
redflag copied to clipboard
Extrapolation detector
A sort of simplified (and more trigger-happy) version of the sklearn distribution comparator, this would simply check each feature to see if it is in the training domain or not.
So during fit the detector learns the range of each feature. During transform it compares each feature in turn.
The alarm would sound if any features are outside. Could use rf.sklearn.BaseRedflagDetector for this.
A threshold argument could allow the user to turn the sensitivity up or down, e.g. allowing an atol or rtol float (or array? One for each feature) to be passed.
Also known as 'covariate shift'
Really not sure this is substantially different from the DistributionComparator