%% Fit a Logistic Model with All Predictors
% Create a creditscorecard object using the CreditCardData.mat file to load the data (using a dataset from Refaat 2011).

load CreditCardData
sc = creditscorecard(data,'IDVar','CustID')

%
% Perform automatic binning.

sc = autobinning(sc,'Algorithm','EqualFrequency')

%
% Use fitmodel to fit a logistic regression model using Weight of Evidence (WOE) data. fitmodel internally transforms all the predictor variables into WOE values, using the bins found with the automatic binning process. Set the VariableSelection name-value pair argument to FullModel to specify that all predictors must be included in the fitted logistic regression model.

sc = fitmodel(sc,'VariableSelection','FullModel');

% Copyright 2015 The MathWorks, Inc.