Closed yogat3ch closed 6 years ago
It looks like the call to the formula is denoted by form
rather than formula
(ie form=form
in the first variable of caretList) - thus the train function was not using the formula provided and used the first column in the data as the response variable - which happened to be a numeric form of date and thus attempted to perform a regression.
devtools::install_github("zachmayer/caretEnsemble")
update.packages(oldPkgs="caret", ask=FALSE)
sessionInfo()
Issue I'm attempting to classify a binary response variable with the code in the first reproducible example below. I would like to use ROC as the metric but get the following error when doing so:
Error in evalSummaryFunction(y, wts = weights, ctrl = trControl, lev = classLevels, : train()'s use of ROC codes requires class probabilities. See the classProbs option of trainControl()
When I leave metric out of the call, I assume it defaults to Accuracy as the response variable is a factor, it results in the following error:Error in auc_(actual, predicted, ranks) : Not compatible with requested type: [type=list; target=double].
In the attempt to create a minimal reproducible example with the UCI Breast Cancer dataset I'm getting an entirely different error - so I've opted to just include the data I am using that caused the errors above as they are higher priority to resolve. I've included the code with the actual data below and the UCI minrepro example at the bottom of the thread. All required packages are listed in the req.packages vector.
Any assistance is appreciated!
Exact, reproducible example with actual data:
Session Info:
Minimal, reproducible example with UCI data:
The code below results in the following error:
Error in names(res$trainingData) %in% as.character(form[[2]]) : argument "form" is missing, with no default
Running this code requires the libraries from the above example to be loaded.