example where Special is incorrectly aggregated into bin index 0:
and for Missing as well:
Note the totals of missing/special plus bin 0 match perfectly.
I have not found an instance in my work where I have Missing and Special in the same metric, but would Imagine that in the OptimalBinning class the binning_tables method is doing some pre-processing during or before building which the .transform method is not emulating before looking up the index of the bin and returning the index, so the first 'normal' bin, the Missing bin and the Special bin all return 0 within the transform method.
Me again (apologies!),
As per the title:
example where Special is incorrectly aggregated into bin index 0:
and for Missing as well:
Note the totals of missing/special plus bin 0 match perfectly.
I have not found an instance in my work where I have Missing and Special in the same metric, but would Imagine that in the OptimalBinning class the binning_tables method is doing some pre-processing during or before building which the .transform method is not emulating before looking up the index of the bin and returning the index, so the first 'normal' bin, the Missing bin and the Special bin all return 0 within the transform method.
Thanks, H