predictorinfo
Summary of credit scorecard predictor properties
Description
[
returns a summary of credit scorecard predictor properties and some basic predictor
statistics.T
,Stats
]
= predictorinfo(sc
,PredictorName
)
Examples
Obtain Information for a Specified PredictorName
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')
sc = creditscorecard with properties: GoodLabel: 0 ResponseVar: 'status' WeightsVar: '' VarNames: {'CustID' 'CustAge' 'TmAtAddress' 'ResStatus' 'EmpStatus' 'CustIncome' 'TmWBank' 'OtherCC' 'AMBalance' 'UtilRate' 'status'} NumericPredictors: {'CustAge' 'TmAtAddress' 'CustIncome' 'TmWBank' 'AMBalance' 'UtilRate'} CategoricalPredictors: {'ResStatus' 'EmpStatus' 'OtherCC'} BinMissingData: 0 IDVar: 'CustID' PredictorVars: {'CustAge' 'TmAtAddress' 'ResStatus' 'EmpStatus' 'CustIncome' 'TmWBank' 'OtherCC' 'AMBalance' 'UtilRate'} Data: [1200x11 table]
Obtain the predictor statistics for the PredictorName
of CustAge
.
[T,Stats] = predictorinfo(sc,'CustAge')
T=1×4 table
PredictorType LatestBinning LatestFillMissingType LatestFillMissingValue
_____________ _________________ _____________________ ______________________
CustAge {'Numeric'} {'Original Data'} {'Original'} {0x0 double}
Stats=4×1 table
Value
______
Min 21
Max 74
Mean 45.174
Std 9.8302
Obtain the predictor statistics for the PredictorName
of ResStatus
.
[T,Stats] = predictorinfo(sc,'ResStatus')
T=1×5 table
PredictorType Ordinal LatestBinning LatestFillMissingType LatestFillMissingValue
_______________ _______ _________________ _____________________ ______________________
ResStatus {'Categorical'} false {'Original Data'} {'Original'} {0x0 double}
Stats=3×1 table
Count
_____
Home Owner 542
Tenant 474
Other 184
Obtain Information for a Specified PredictorName
After Using fillmissing
Create a creditscorecard
object using the CreditCardData.mat
file to load the data (using a dataset from Refaat 2011).
load CreditCardData sc = creditscorecard(dataMissing,'BinMissingData',true,'IDVar','CustID'); sc = autobinning(sc);
Use fillmissing
to replace missing values for the CustAge
predictor with a value of 38
.
sc = fillmissing(sc,'CustAge','constant',38);
Obtain the predictor statistics for the PredictorName
of CustAge
.
[T,Stats] = predictorinfo(sc,'CustAge')
T=1×4 table
PredictorType LatestBinning LatestFillMissingType LatestFillMissingValue
_____________ ________________________ _____________________ ______________________
CustAge {'Numeric'} {'Automatic / Monotone'} {'Constant'} {[38]}
Stats=4×1 table
Value
______
Min 21
Max 74
Mean 44.932
Std 9.7436
Use fillmissing
to replace missing values for the ResStatus
predictor with a mode
value.
sc = fillmissing(sc,'ResStatus','mode');
Obtain the predictor statistics for the PredictorName
of ResStatus
.
[T,Stats] = predictorinfo(sc,'ResStatus')
T=1×5 table
PredictorType Ordinal LatestBinning LatestFillMissingType LatestFillMissingValue
_______________ _______ ________________________ _____________________ ______________________
ResStatus {'Categorical'} false {'Automatic / Monotone'} {'Mode'} {'Home Owner'}
Stats=3×1 table
Count
_____
Tenant 457
Home Owner 563
Other 180
Input Arguments
sc
— Credit scorecard model
creditscorecard
object
Credit scorecard model, specified as a
creditscorecard
object. Use creditscorecard
to create
a creditscorecard
object.
PredictorName
— Predictor name
character vector
Predictor name, specified using a character vector containing the
names of the credit scorecard predictor of interest.
PredictorName
is case-sensitive.
Data Types: char
Output Arguments
T
— Summary information for specified predictor
table
Summary information for specified predictor, returned as table with the following columns:
'PredictorType'
—'Numeric'
or'Categorical'
.'Ordinal'
— For categorical predictors, a boolean indicating whether it is ordinal.'LatestBinning'
— Character vector indicating the last applied algorithm for the input argumentPredictorName
. The values are:'Original Data'
— When no binning is applied to the predictor.'Automatic / BinningName'
— Where'BinningName'
is one of the following:Monotone
,Equal Width
, orEqual Frequency
.'Manual'
— After each call ofmodifybins
, where either'CutPoints'
,'CatGrouping'
,'MinValue'
, or'MaxValue'
are modified.
'LatestFillMissingType'
— Iffillmissing
has been applied to the predictor, the value of theStatistics
argument forfillmissing
is displayed. If the predictor does not have any missing data, then the fill type is'Original'
.'LatestFillMissingValue'
— Iffillmissing
has been applied to the predictor, the fill value is displayed. If the predictor does not have any missing data, then the fill value is[ ]
.
The predictor’s name is used as a row name in the table that is returned.
Stats
— Summary statistics for the input PredictorName
table
Summary statistics for the input PredictorName
,
returned as a table. The corresponding value is stored in the
'Value'
column.
The table’s row names indicate the relevant statistics for numeric predictors:
'Min'
— Minimum value in the sample.'Max'
— Maximum value in the sample.'Mean'
— Mean value in the sample.'Std'
— Standard deviation of the sample.Note
For data types other than 'double' or 'single', numeric precision may be lost for the standard deviation. Data types other than 'double' or 'single' are cast as 'double' before computing the standard deviation.
For categorical predictors, the row names contain the names of the
categories, with corresponding total count in the
'Count'
column.
Version History
Introduced in R2015b
See Also
creditscorecard
| modifybins
| modifypredictor
| bininfo
| fillmissing
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)