Closed zachmayer closed 1 month ago
models <- caretList( iris[,1:2], factor(ifelse(iris[,5]=='setosa', 'Yes', 'No')), tuneLength=1, methodList=c('rf', 'gbm'), trControl=trainControl(method='cv', number=2, savePredictions=TRUE, classProbs=TRUE)) ctrl <- models[[1]] new_model <- train( iris[,1:2], factor(ifelse(iris[,5]=='setosa', 'Yes', 'No')), tuneLength=1, method=c('glmnet'), trControl=trainControl(method='cv', number=2, savePredictions=FALSE, classProbs=TRUE) ) models2 <- c(list('glmnet'=new_model), models) models3 <- c(models, list('glmnet'=new_model)) #THIS IS A BUG expect_error(check_caretList_model_types(models3))