这是我的代码
w<-read.csv("e:/RF/huizong111.csv",header = T)
ind<-sample(2,nrow(w),replace = TRUE,prob = c(0.75,0.25))
traindata<-w[ind==1,]
testdata<-w[ind==2,]
train<-as.matrix(traindata)
test<-as.matrix(testdata[,-1])
y<-as.matrix(traindata$fl)
library(xgboost)
xgb <- xgboost(data = train, label = y, eta = 0.1,max_depth = 15, nround=25, subsample = 0.5,colsample_bytree = 0.5,seed = 1,eval_metric = "merror",objective = "multi:softprob",num_class = 12,nthread = 3)
[1] train-merror:0.000000
[2] train-merror:0.000000
[3] train-merror:0.000000
[4] train-merror:0.000000
[5] train-merror:0.000000
.....
不知道为啥结果都是一样的
数据在https://bbs.pinggu.org/thread-6335135-1-1.html