%% Perform Automatic Binning for a Categorical Predictor Using the Defaults
% Create a creditscorecard object using the CreditCardData.mat file to load the data (using a dataset from Refaat 2011).

load CreditCardData 
sc = creditscorecard(data);

%
% Perform automatic binning for the predictor that is a categorical predictor called ResStatus using the default options. By default, autobinning uses the Monotone algorithm.

sc = autobinning(sc,'ResStatus');

%
% Use bininfo to display the binned data.

bi = bininfo(sc, 'ResStatus')

% Copyright 2015 The MathWorks, Inc.