在这里,我根据其化学成分预测玻璃的类型。化学成分是输入的数字类型(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)
在这里运行绘图指令后,我提到了错误。