2014-04-05 67 views
0

我正在用C50包裝的插入符號列車包裝紙掙扎。我想,以適應預測模型 與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 

謝謝

回答

2

使用method = "C5.0"(你遺漏了點)。該軟件被稱爲「C5.0」,但R軟件包不能有點,因此軟件包名稱(「C50」)和函數名稱(「C5.0」)的區別。

最大