All models failed in tune_grid(). See the `.notes` column.

I keep getting this error when i try to train a random forest model.

Warning message:
All models failed in tune_grid(). See the .notes column.

## SPLITS
train_split <- initial_split(train_processed, prop = 0.8)
data_train <- training(train_split)
data_test <- testing(train_split)


## RANDOM FOREST RECIPE
ranger_recipe <- 
        recipe(label ~ .,
               data = data_train) %>%
        step_date(join_date, features = c("month", "year")) %>%
        step_zv(all_predictors())

## MODEL SPEC
ranger_spec <- 
        rand_forest(mtry = tune(), 
                    min_n = tune(), 
                    trees = 1000) %>% 
        set_mode("classification") %>% 
        set_engine("ranger") 

## WORKFLOW
ranger_workflow <- 
        workflow() %>% 
        add_recipe(ranger_recipe) %>% 
        add_model(ranger_spec) 


## CV
set.seed(1234)
d_folds <- vfold_cv(data_train, v = 10, strata = label)
d_folds

## PARALLEL PROCESSING
doParallel::registerDoParallel()

##TUNING
set.seed(25508)
tune_res <- tune_grid(
        ranger_workflow, 
        resamples = d_folds,
        grid = 20
)

This, or a reprex may help elicit answers.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.