水天一色DIY 发表于 2014-7-3 17:33 
你的结果是怎么样的,wirte.table又是报什么错?
mar.rf<-randomForest(mar[,-1],mar[,1])
这个是随机森林的程序 得到的结果
直接输入mar.rf
就才会出来
Call:
randomForest(x = mar[, -1], y = mar[, 1])
Type of random forest: classification
Number of trees: 500
No. of variables tried at each split: 3
OOB estimate of error rate: 55.7%
Confusion matrix:
类似的结果
我write.table(mar.rf,"")
错误提示如下:
Error in as.data.frame.default(x[
], optional = TRUE, stringsAsFactors = stringsAsFactors) :
cannot coerce class ""randomForest"" to a data.frame
由于分类种类太多了。所以满屏了。 想要的分类误差率 都看不到了