Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upPre-processing change in caret 6.0-58 cause the Adaptive Resampling error #304
Comments
|
A couple of things:
The last item shows that you didn't test the exact code before submitting. Please do this with a reproducible example next time. However, there is a bug and it doesn't have anything to do with Thanks, Max |
|
It looks like things are fixed now: > library(caret)
>
> set.seed(1)
> dat <- twoClassSim(100)
>
> mod1 <- train(Class ~ ., data = dat,
+ method = "rf",
+ preProc = c("center", "scale"),
+ trControl = trainControl(method = "adaptive_cv",
+ classProbs = TRUE,
+ verboseIter = TRUE,
+ adaptive = list(min = 5,
+ alpha = 0.05,
+ method = "BT",
+ complete = TRUE)))
+ Fold01.Rep1: mtry= 2
- Fold01.Rep1: mtry= 2
+ Fold01.Rep1: mtry= 8
- Fold01.Rep1: mtry= 8
+ Fold01.Rep1: mtry=15
- Fold01.Rep1: mtry=15
+ Fold02.Rep1: mtry= 2
- Fold02.Rep1: mtry= 2
+ Fold02.Rep1: mtry= 8
- Fold02.Rep1: mtry= 8
+ Fold02.Rep1: mtry=15
- Fold02.Rep1: mtry=15
+ Fold03.Rep1: mtry= 2
- Fold03.Rep1: mtry= 2
+ Fold03.Rep1: mtry= 8
- Fold03.Rep1: mtry= 8
+ Fold03.Rep1: mtry=15
- Fold03.Rep1: mtry=15
+ Fold04.Rep1: mtry= 2
- Fold04.Rep1: mtry= 2
+ Fold04.Rep1: mtry= 8
- Fold04.Rep1: mtry= 8
+ Fold04.Rep1: mtry=15
- Fold04.Rep1: mtry=15
+ Fold05.Rep1: mtry= 2
- Fold05.Rep1: mtry= 2
+ Fold05.Rep1: mtry= 8
- Fold05.Rep1: mtry= 8
+ Fold05.Rep1: mtry=15
- Fold05.Rep1: mtry=15
o no models eliminated; 3 remain
+ Fold06.Rep1: mtry= 2
- Fold06.Rep1: mtry= 2
+ Fold06.Rep1: mtry= 8
- Fold06.Rep1: mtry= 8
+ Fold06.Rep1: mtry=15
- Fold06.Rep1: mtry=15
o no models eliminated; 3 remain
+ Fold07.Rep1: mtry= 2
- Fold07.Rep1: mtry= 2
+ Fold07.Rep1: mtry= 8
- Fold07.Rep1: mtry= 8
+ Fold07.Rep1: mtry=15
- Fold07.Rep1: mtry=15
o no models eliminated; 3 remain
+ Fold08.Rep1: mtry= 2
- Fold08.Rep1: mtry= 2
+ Fold08.Rep1: mtry= 8
- Fold08.Rep1: mtry= 8
+ Fold08.Rep1: mtry=15
- Fold08.Rep1: mtry=15
o no models eliminated; 3 remain
+ Fold09.Rep1: mtry= 2
- Fold09.Rep1: mtry= 2
+ Fold09.Rep1: mtry= 8
- Fold09.Rep1: mtry= 8
+ Fold09.Rep1: mtry=15
- Fold09.Rep1: mtry=15
o no models eliminated; 3 remain
+ Fold10.Rep1: mtry= 2
- Fold10.Rep1: mtry= 2
+ Fold10.Rep1: mtry= 8
- Fold10.Rep1: mtry= 8
+ Fold10.Rep1: mtry=15
- Fold10.Rep1: mtry=15
o no models eliminated; 3 remain
Aggregating results
Selecting tuning parameters
Fitting mtry = 2 on full training setAt least I know that someone is using it =] Thanks, Max |
|
Thank you so much! Max! |
I noticed a new fix of pre-processing in the latest version caret 6.0-58, but this new fix can cause the Adaptive Resampling error.Here is the code:
While the old version 6.0-57 won't throw out this error.
Besides, when using the Adaptive Resampling methods, some time the results shows: "the x parameter filtering failed. "Though with the error, it seems predict still work, what does that mean?