The Optimal Binning Algorithm
The basic steps of the Optimal Binning algorithm can be characterized as follows:
Preprocessing (optional). The binning input variable is divided into n bins (where n is specified by you), and each bin contains the same number of cases or as near the same number of cases as possible.
Identifying potential cutpoints. Each distinct value of the binning input that does not belong to the same category of the guide variable as the next larger distinct value of the binning input variable is a potential cutpoint.
Selecting cutpoints. The potential cutpoint that produces the greatest information gain is evaluated by the MDLP acceptance criterion. Repeat until no potential cutpoints are accepted. The accepted cutpoints define the endpoints of the bins.