%% Create a creditscorecard Object
% Create a creditscorecard object using the CreditCardData.mat file to load the data (using a dataset from Refaat 2011).

load CreditCardData 
sc = creditscorecard(data)

% In this example, the default values for the properties ResponseVar, PredictorVars and GoodLabel are assigned when this object is created. By default, the property ResponseVar is set to the variable name that is in the last column of the input data ('status' in this example). The property PredictorVars contains the names of all the variables that are in VarNames, but excludes IDVar and ResponseVar. Also, by default in the previous example, GoodLabel is set to 0, since it is the value in the response variable (ResponseVar) with the highest count.
%
% Display the creditscorecard object properties using dot notation.

sc.PredictorVars
sc.VarNames

%
% Since IDVar and PredictorVars have public access, you can change their values at the command line.

sc.IDVar = 'CustID'
sc.PredictorVars = {'CustIncome','ResStatus','AMBalance'}
disp(sc)

% Copyright 2015 The MathWorks, Inc.