2

我正在为 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   

提前致谢

4

1 回答 1

4

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

最大限度

于 2014-04-05T18:41:18.227 回答