Automatic Binary Binning Algorithm