I am trying to do some data analysis and the idea is to use the autobinning
command to create optimal bins, calculate the WOE (Weight of evidence) value for each bin and then replace the original values that belong to each bin with the respective WOE value. So below is what I do:
CreSC = creditscorecard(Data_Table ,'IDVar','CustID','GoodLabel',0);
scAB = autobinning(CreSC,'Algorithm','Monotone');
DataTransformed = bindata(scAB,t_Data,'OutputType','WOE');
The problem is that the above procedure does not consider the NaN
values that are in the DATA and automatically excludes them.
My aim is to create a separate bin only for the NaN
values and force the autobinning
command to consider the NaN
values.
Does anyone have a reasonable solution ?
Find all NaN values.
Pick a value that is not present inside your data.
Replace all NaN values by this value.
Run your binning, and map this value yourself to NaN in the end.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With