Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makes sure ranger method can generate grid of length 1. (topepo#1307)
* Update ranger.R Currently, ranger gives an error if passed with `trainControl(method = "none")`. You can see the error here: ``` rm( list = ls()) n <- 1e3 x <- cbind(x = rnorm(n)) y <- c(x + rnorm(n)) train(x, y, method = "ranger", trControl = trainControl(method = "none")) ``` This was happening because the minimal grid was a length 2, as it was passing both `srule` and "extratrees" to expand.grid regardless of the argument `len`. The proposed change makes sure expand.grid will have length 1, if `len = 1`. * reup model file --------- Co-authored-by: Max Kuhn <[email protected]>
- Loading branch information