我通过执行以下操作得到了上述错误消息
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)
我收到如下错误:
Error in C5.0.default(trainX, trainy) :
C5.0 models require a factor outcome
因此,我添加了
trainy=as.factor(trainy)
我收到如下错误:
Error in UseMethod("QuinlanAttributes") : no applicable method
for'QuinlanAttributes' applied to an object of class "c('POSIXct',
'POSIXt')"
随时尝试使用以下软件包POSIXct,POSIXt,PCICt,但它无法正常工作。