全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
3809 6
2017-11-13
Msg_data <- read.csv('C:/Users/shenning/Desktop/载重分析数据/平均载重xy.csv')
Msg_data <- Msg_data[1:50000,]
> Msg_data$设备号 <- as.factor(Msg_data$设备号)
> set.seed(1)
> ind <- sample(2,nrow(Msg_data),replace=T,prob=c(0.7,0.3))
> train<-Msg_data[ind==1,]
> test<- Msg_data[ind==2,]
> train<- rfImpute(载重值~., data=train)
Error in randomForest.default(xf, y, ntree = ntree, ..., do.trace = ntree,  :
Can not handle categorical predictors with more than 53 categories.

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2017-11-13 15:51:26
#数据自变量7个,包括一个因子‘设备号’,因变量为’载重值‘

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2017-11-13 16:02:28
大神们,帮忙解答下吧
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2017-11-14 17:33:30
“Can not handle categorical predictors with more than 53 categories.”:告知,因子变量的因子水平数太多太多了,randomForest 无法处理!!!!!!!!!!!!!!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2017-11-15 15:35:23
jgchen1966 发表于 2017-11-14 17:33
“Can not handle categorical predictors with more than 53 categories.”:告知,因子变量的因子水平数太 ...
可是我删掉变量只剩三个的时候也提示这个,怎么办?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2017-11-16 05:24:07
鱼铃五校名2 发表于 2017-11-13 15:41
Msg_data  ind  train test train
从结果来看,是某个变量的类别数超过了53个,是不是设备号?设备号有几类?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群