C50通过插入包挣扎

时间:2014-04-05 15:49:43

标签: r r-caret

我正在努力使用C50包装的插入式火车包装。我正在尝试拟合预测模型 与

train(x=dataTrain[,predModelFactorized], y=dataTrain[,outcome], method="C50", metric="ROC", trControl=trCtrl,   tuneGrid = c50Grid)

 c50Grid <- expand.grid(trials = c(1:9, (1:10)*10),model = c("tree", "rules"),winnow = c(TRUE, FALSE))

我得到了

Error in train.default(x = dataTrain[, predModelFactorized], y = dataTrain[,  : 
  wrong model type for classification

我的会话信息是

 sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=Italian_Italy.1252  LC_CTYPE=Italian_Italy.1252   
[3] LC_MONETARY=Italian_Italy.1252 LC_NUMERIC=C                  
[5] LC_TIME=Italian_Italy.1252    

attached base packages:
[1] splines   grid      stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
[1] pROC_1.7.1      nnet_7.3-8      Formula_1.1-1   survival_2.37-7
[5] caret_6.0-24    ggplot2_0.9.3.1 lattice_0.20-29 rj_1.1.3-1     

loaded via a namespace (and not attached):
 [1] car_2.0-19          cluster_1.15.2      codetools_0.2-8    
 [4] colorspace_1.2-4    compiler_3.0.2      dichromat_2.0-0    
 [7] digest_0.6.4        foreach_1.4.1       gtable_0.1.2       
[10] Hmisc_3.14-3        iterators_1.0.6     labeling_0.2       
[13] latticeExtra_0.6-26 MASS_7.3-31         munsell_0.4.2      
[16] plyr_1.8.1          proto_0.3-10        RColorBrewer_1.0-5 
[19] Rcpp_0.11.1         reshape2_1.2.2      rj.gd_1.1.3-1      
[22] scales_0.2.3        stringr_0.6.2       tools_3.0.2   

提前致谢

1 个答案:

答案 0 :(得分:2)

使用method = "C5.0"(您忽略了点)。该软件名为“C5.0”,但R软件包不能有点,因此软件包名称(“C50”)和函数名称(“C5.0”)不同。

最高