因此,我正在使用credit.csv开发Rmd。我有以下代码
#install.packages("C50")
library(C50)
credit_model = C5.0(credit_train[-2], # field 21 is the default, and we don't want that as part of the tree
credit_train$default)
credit_model,它显示此错误。
Error: C5.0 models require a factor outcome但是如果我尝试将默认值转换为这样的因子:
#install.packages("C50")
library(C50)
credit_train$default<-as.factor(credit_train$default)
credit_model = C5.0(credit_train[-2], # field 21 is the default, and we don't want that as part of the tree
credit_train$default)
credit_model它显示以下错误:
c50 code called exit with value 1
Call:
C5.0.default(x = credit_train[-2], y = credit_train$default)
Classification Tree
Number of samples: 900
Number of predictors: 20
Tree size: 0
Non-standard options: attempt to group attributes我真的不知道该怎么做数据集中没有缺失的字段
发布于 2021-01-11 06:09:56
模型的内部逻辑已被删除。但是您可以使用以下内容来查看它:摘要(Credit_model)
https://stackoverflow.com/questions/65287674
复制相似问题