ModifyPredictor
设置信用记分卡预测指标的属性
描述
例子
修改预测改变预测类型from Numeric to Categorical
创建一个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'
预测指标。
输入参数
sc
-信用记分卡模型
CreditsCoreCard
目的
信用记分卡模型,,,,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.姓名
是参数名称和Value
is the corresponding value.姓名
必须出现在引号中。您可以按任何顺序指定几个名称和值对参数姓名1,Value1,...,NameN,ValueN
。
sc = modifypredictor(sc,{'CustAge','CustIncome'},'PredictorType','Categorical','Ordinal',true)
预测类型
-一个或多个预测变量转换为一个或多个预测指标
''
没有转换(默认)|具有值的角色向量'数字'
,,,,'Categorical'
一个或多个预测因子被转换为的预测类型,指定为逗号分隔对“预测类型”
和角色向量。可能的值是:
''
- 不发生转换。'数字'
- 由预测器
is converted to numeric.'Categorical'
- 由预测器
转换为分类。
数据类型:char
序数
-预测因素是否转换为分类的指标是序数
错误的
(默认)|逻辑with valuestrue
,,,,错误的
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“序数”
和一个具有值的逻辑true
or错误的
。
笔记
此可选输入参数仅用于类型的预测指标'Categorical'
。
数据类型:逻辑
输出参数
sc
- 信用记分卡模型
CreditsCoreCard
目的
信用记分卡模型,,,,returned as an updatedCreditsCoreCard
目的。
也可以看看
matlab命令
您单击了与此MATLAB命令相对应的链接:
通过在MATLAB命令窗口中输入该命令。Web浏览器不支持MATLAB命令。万博1manbetx
You can also select a web site from the following list:
如何获得最佳网站性能
选择中国网站(中文或英语)以获得最佳场地性能。其他Mathworks乡村网站未针对您所在的访问进行优化。
美洲
- América Latina(Español)
- 加拿大(英语)
- 美国(英语)