data<-dataOri[,c(1,2,4,7,8,9,13,14,16,17,18,19,20)] modelData=data[,c(2:12)] x<-modelData[c(1:nrow(modelData)),c(-6,-8)] x=na.omit(x) traindata<-x[sample(1:nrow(x),nrow(x)*0.7,replace=FALSE),] testdata<-x[sample(1:nrow(x),nrow(x)-nrow(traindata),replace=FALSE),] library(randomForest) RF<-randomForest(as.factor(is_back)~.,data=traindata,proximity=TRUE, importance=TRUE) plot(RF)
|