I got the above error message by doing the following
cc2016cohort_amv$spl=sample.split(cc2016cohort_amv$nwb,SplitRatio = 0.7)
table(cc2016cohort_amv$spl)
train=subset(cc2016cohort_amv, cc2016cohort_amv$spl==TRUE)
test=subset(cc2016cohort_amv, cc2016cohort_amv$spl==FALSE)
trainX=train[,1:25]
trainy=train[,26]
testX=test[,1:25]
testy=test[,26]
model=C50::C5.0(trainX, trainy)
I received error as below:
Error in C5.0.default(trainX, trainy) :
C5.0 models require a factor outcome
Thus, I added
trainy=as.factor(trainy)
I received error as below:
Error in UseMethod("QuinlanAttributes") : no applicable method
for'QuinlanAttributes' applied to an object of class "c('POSIXct',
'POSIXt')"
Tried using the following packages POSIXct,POSIXt,PCICt,anytime, but it doesn't work.