【发布时间】:2014-07-24 21:10:47
【问题描述】:
当我运行预测函数时,我得到这个错误:
Error in predict.randomForest(fit, newdata = na.roughfix(csvTest[, -c(1:2, :
'prob' or 'vote' not meaningful for regression code here
这是代码:
fit <- foreach (ntree = rep (round(number_trees/nc), nc),
.combine = combine, .packages = 'randomForest') %dopar% randomForest(y=csv$mal,x=na.roughfix (csv[, c(1:2,4:5,8:13,17,19:20,22:29,ncol(csv))]), ntree = number_trees)
prob <- predict (fit, newdata = na.roughfix (csvTest[, -c(1:2,4:5,8:13,17,19:20,22:29,ncol(csvTest))]), type = 'prob')[, 2]
谁能帮我理解这是什么问题? 谢谢
【问题讨论】:
标签: r random-forest predict