使用“glm”方法运行活检数据集的训练算法,由于间隔数无效,我遇到了错误。
我试图运行 R 代码:
biopsy_ = na.omit(biopsy[,-c(1)]) # 1 = ID
#
biopsy_$class = 1
#
ctrl <- trainControl(method="repeatedcv", number= 100, repeats=1)
fit <- train(class~., data=biopsy_,
method="glm",
family="binomial",
trControl=ctrl,
preProcess = c("center", "scale"))
fit
但我收到以下错误:
Error in cut.default(y, breaks, include.lowest = TRUE) :
invalid number of intervals