0

在这里,我根据其化学成分预测玻璃的类型。化学成分是输入的数字类型(Ri、Na 等),玻璃的类型是输出(Typec),它是因子。使用 C5.0 构建模型后我收到类似的错误

“错误:仅限树模型”

这是我的代码:

train=datax[sample(nrow(datax),80,replace=F),]

test=datax[!(1:nrow(datax))%in%as.numeric(row.names(train)),]

model=C5.0(Typec~.,data=train,rules=T, ntree= 50)

plot(model) 

在这里运行绘图指令后,我提到了错误。

4

1 回答 1

0
model=C5.0(Typec~.,data=train,rules=T, ntree= 50)

删除“rules = T”参数,然后你就可以绘制图表

于 2020-03-24T21:14:20.770 回答