Running the train algorithm for biopsy dataset using 'glm' method I had the error due to invalid number of intervals.
I tried to run the R code:
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
But I received the following error:
Error in cut.default(y, breaks, include.lowest = TRUE) :
invalid number of intervals