rpart警告消息,然后没有形成正确的rpart图

时间:2019-04-17 13:58:53

标签: r rpart

我尝试了rpart,但遇到以下错误,并且rpart图仅显示0

  

警告消息:错误为:在小标题上设置行名是   不推荐使用。

未形成正确的rpart图。下面是生成的图:

enter image description here

rpart.oc<-function(seed,training,labels,otrl){
  ol<-makeSOCKcluster(6,type="SOCK")
  registerDoSNOW(ol)
  set.seed(seed)
  rpart.oc<-train(x=training,y=labels,method="rpart",tuneLength=30,trControl=otrl)
  stopCluster(ol)
  return(rpart.oc)
}
rpart.1.cv.1o<-rpart.oc(94622,rpart.train.1o,of.label,otrl.3))


Classes ‘tbl_df’, ‘tbl’ and 'data.frame':   1898 obs. of  6 variables:
 $ so : Factor w/ 10 levels "",..: 7 7 7 7 7 7 7 7 7 7 ...
 $ a    : num  63 7 3 45 2 4 69 0 7 0 ...
 $ n   : Factor w/ 5 levels "","",..: 3 2 2 1 2 3 1 1 2 2 ...
 $ s: Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
 $ d   : Factor w/ 7 levels "Friday","Monday",..: 6 6 7 7 5 5 1 1 1 1 ...
 $ c: Factor w/ 7 levels "A","C",..: 6 2 4 2 2 4 1 2 7 2 

0 个答案:

没有答案