C5.0 model doesn't work in R

r
machine_learning
decision_trees

#1

Hello,everybody.

I was faced with some strange problem in R.
C5.0 model doesn’t work even in simple cases.

I tried to build C5.0 tree on the well known data “IRIS”.
data(iris)

set.seed(9850)
g<-runif(nrow(iris))
irisr<-iris[order(g),]
m1<-C5.0(irisr[1:100,-5],irisr[1:100,5])

But as a result i got : "c50 code called exit with value 1"
In some topic on this forum i found the same problem with classic dataset “titanic” from Kaggle. But in titanic case problem was in factor variables,which cannot be empty (i mean NULL).
And this problem was fixed using following command:
levels(train$Cabin)[1] = "missing"
After that algorithm started successfully.

But there is no empty fields in my data and no empty levels of factor variables.
str(irisr)
data.frame’: 150 obs. of 5 variables:
Sepal.Length: num 7.1 5.1 6 5.4 5.8 6.9 7.7 5.5 5.7 4.4 ... Sepal.Width : num 3 3.8 2.2 3.9 2.7 3.1 3.8 2.6 2.6 3.2 …
Petal.Length: num 5.9 1.5 4 1.3 3.9 4.9 6.7 4.4 3.5 1.3 ... Petal.Width : num 2.1 0.3 1 0.4 1.2 1.5 2.2 1.2 1 0.2 …
$ Species : Factor w/ 3 levels “setosa”,“versicolor”,…: 3 1 2 1 2 2 3 2 2 1 …

I tried to build model even on the basic example from help(C5.0)

install.packages(“C50”)
library(“C50”)
data(churn)
treeModel <- C5.0(x = churnTrain[, -20], y = churnTrain$churn)
or
ruleModel <- C5.0(churn ~ ., data = churnTrain, rules = TRUE)

The same result: c50 code called exit with value 1
I would be appreciate for any help.
Thanks a lot

Dmitry