使用“ 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
答案 0 :(得分:0)
您是否有超过100行?还有多少?