I read a similar post related to this problem, but I am afraid this error code is due something else. I have a CSV file with 8-observation and 10 variables:
> str(rorIn)
'data.frame': 8 obs. of 10 variables:
$ Acuity : Factor w/ 3 levels "Elective ","Emergency ",..: 1 1 2 2 1 2 2 3
$ AgeInYears : int 49 56 77 65 51 79 67 63
$ IsPriority : int 0 0 1 0 0 1 0 1
$ AuthorizationStatus: Factor w/ 1 level "APPROVED ": 1 1 1 1 1 1 1 1
$ iscasemanagement : Factor w/ 2 levels "N","Y": 1 1 2 1 1 2 2 2
$ iseligible : Factor w/ 1 level "Y": 1 1 1 1 1 1 1 1
$ referralservicecode: Factor w/ 4 levels "12345","278",..: 4 1 3 1 1 2 3 1
$ IsHighlight : Factor w/ 1 level "N": 1 1 1 1 1 1 1 1
$ RealLengthOfStay : int 25 1 1 1 2 2 1 3
$ Readmit : Factor w/ 2 levels "0","1": 2 1 2 1 2 1 2 1
I invoke the algorithm like this:
library("C50")
rorIn <- read.csv(file = "RoRdataInputData_v1.6.csv", header = TRUE, quote = "\"")
rorIn$Readmit <- factor(rorIn$Readmit)
fit <- C5.0(Readmit~., data= rorIn)
Then I get:
> source("~/R-workspace/src/RoR/RoR/testing.R")
c50 code called exit with value 1
>
I am following other recommendations such as: - Using a factor as the decision variable - Avoiding empty data
Any help on this?, I read this is one of the best algorithm for machine learning, but I get this error all the time.
Here is the original dataset:
Acuity,AgeInYears,IsPriority,AuthorizationStatus,iscasemanagement,iseligible,referralservicecode,IsHighlight,RealLengthOfStay,Readmit
Elective ,49,0,APPROVED ,N,Y,SNF ,N,25,1
Elective ,56,0,APPROVED ,N,Y,12345,N,1,0
Emergency ,77,1,APPROVED ,Y,Y,OBSERVE ,N,1,1
Emergency ,65,0,APPROVED ,N,Y,12345,N,1,0
Elective ,51,0,APPROVED ,N,Y,12345,N,2,1
Emergency ,79,1,APPROVED ,Y,Y,278,N,2,0
Emergency ,67,0,APPROVED ,Y,Y,OBSERVE ,N,1,1
Urgent ,63,1,APPROVED ,Y,Y,12345,N,3,0
Thanks in advance for any help,
David