|
在做C4.5算法实现过程中出现了以下信息提示,啥意思?
> if(require("party",quietly=TRUE))
+ plot(m1)
Error in UseMethod("as.party") :
no applicable method for 'as.party' applied to an object of class "c('J48', 'Weka_tree', 'Weka_classifier')"
这是完整代码:
library(RWeka)
library(party)
oldpar=par(mar=c(3,3,1.5,1),mgp=c(1.5,0.5,0),cex=0.3)
data(iris)
m1<-J48(Species~.,data=iris)
m1
table(iris$Species,predict(m1))
write_to_dot(m1)
if(require("party",quietly=TRUE))
plot(m1) |
|