Main Content

ModifyPredictor

设置信用记分卡预测指标的属性

描述

例子

sc= modifypredictor(sc,,,,预测器设置信用记分卡预测指标的属性。

例子

sc= modifypredictor(___,,,,名称,价值sets the properties of the credit scorecard predictors using optional name-value pair arguments.

例子

全部收缩

创建一个CreditsCoreCard对象使用CreditCardData。mat文件加载数据(使用Refaat 2011中的数据集)。实际上,多次代表分类数据。为了显示分类数据作为数字数据的情况,该变量的数据'resstatus'有意转换为数字值。

加载CreditCardDatadata.ResStatus = double(data.ResStatus); sc = creditscorecard(data,'idvar',,,,“ custid'
SC =带有属性的CreditsCoreCard:GoodLabel:0 ResponseVar:'状态'strogeSvar:''varnames:{1x11 cell} numercerPredictors:{1x7 cell} cancorical predictalpredictors:{'empstatus'empstatus''empstatus'其他{1x9单元}数据:[1200x11表]
[T,Stats] = predictorinfo(sc,'resstatus'
t =1×4桌预测类型LatestBinning LatestFillMissingType LatestFillMissingValue _____________ _________________ _____________________ ______________________ ResStatus {'Numeric'} {'Original Data'} {'Original'} {0x0 double}
Stats=4×1 tableValue _______ Min 1 Max 3 Mean 1.7017 Std 0.71833

注意'resstatus'出现作为数字predictors财产。假设你想要'resstatus'被视为分类数据。例如,您可能需要允许自动安装算法重新排序类别。利用ModifyPredictor更改“预测类型”of the预测器'resstatus'从数字到分类。

sc = modifypredictor(sc,'resstatus',,,,“预测类型”,,,,'Categorical'
sc = creditscorecard with properties: GoodLabel: 0 ResponseVar: 'status' WeightsVar: '' VarNames: {1x11 cell} NumericPredictors: {1x6 cell} CategoricalPredictors: {'ResStatus' 'EmpStatus' 'OtherCC'} BinMissingData: 0 IDVar: 'CustID'predictorvars:{1x9 cell}数据:[1200x11表]
[T,Stats] = predictorinfo(sc,'resstatus'
t =1×5桌PredictorType Ordinal LatestBinning LatestFillMissingType LatestFillMissingValue _______________ _______ _________________ _____________________ ______________________ ResStatus {'Categorical'} false {'Original Data'} {'Original'} {0x0 double}
Stats=3×1 tableCount _____ C1 542 C2 474 C3 184

注意'resstatus'现在出现在'Categorical'预测指标。

输入参数

全部收缩

信用记分卡模型,,,,specified as aCreditsCoreCard目的。利用CreditsCoreCard创建一个CreditsCoreCard目的。

预测器名称,,,,specified using a character vector or cell array of character vectors containing the names of the credit scorecard predictors.预测器对病例敏感。

数据类型:char|细胞

名称值参数

指定可选的逗号分隔对名称,价值arguments.姓名是参数名称和Valueis the corresponding value.姓名必须出现在引号中。您可以按任何顺序指定几个名称和值对参数姓名1,Value1,...,NameN,ValueN

Example:sc = modifypredictor(sc,{'CustAge','CustIncome'},'PredictorType','Categorical','Ordinal',true)

一个或多个预测因子被转换为的预测类型,指定为逗号分隔对“预测类型”和角色向量。可能的值是:

  • ''- 不发生转换。

  • '数字'- 由预测器is converted to numeric.

  • 'Categorical'- 由预测器转换为分类。

数据类型:char

Indicator for whether predictors being converted to categorical or existing categorical predictors are treated as ordinal data, specified as the comma-separated pair consisting of“序数”和一个具有值的逻辑trueor错误的

笔记

此可选输入参数仅用于类型的预测指标'Categorical'

数据类型:逻辑

输出参数

全部收缩

信用记分卡模型,,,,returned as an updatedCreditsCoreCard目的。

Introduced in R2015b