zachmayer / caretEnsemble

caret models all the way down :turtle:
http://zachmayer.github.io/caretEnsemble/
Other
226 stars 75 forks source link

check_caretList_model_types fails to detect missing predictions in models other than the first model #150

Closed zachmayer closed 1 month ago

zachmayer commented 9 years 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))