5

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 ?

Sardar Usama
  • 19,536
  • 9
  • 36
  • 58
Man Gou
  • 113
  • 1
  • 5

1 Answers1

1

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.

Stack Player
  • 1,470
  • 2
  • 18
  • 32
  • Thank you for the answer. I have tried this already. This way does not seem to work because the intervals of the bins are affected with the assigned value on the NaNs. Again, my goal is to create a bin with ONLY NaNs! – Man Gou May 08 '17 at 08:24