Use method = "C5.0"
(you left out the dot). The software is called "C5.0" but R packages cannot have dots, thus the difference in the package name ("C50") and the function name ("C5.0").
Max
Pergunta
I'm struggling with caret train wrapper for C50 package. I'm trying to fit a predictive model with
train(x=dataTrain[,predModelFactorized], y=dataTrain[,outcome], method="C50", metric="ROC", trControl=trCtrl, tuneGrid = c50Grid)
with
c50Grid <- expand.grid(trials = c(1:9, (1:10)*10),model = c("tree", "rules"),winnow = c(TRUE, FALSE))
I get
Error in train.default(x = dataTrain[, predModelFactorized], y = dataTrain[, :
wrong model type for classification
and my session info is
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
Thanks in advance
Solução
Use method = "C5.0"
(you left out the dot). The software is called "C5.0" but R packages cannot have dots, thus the difference in the package name ("C50") and the function name ("C5.0").
Max