Reputation: 11
flexible_model <-
discrim_flexible( mode = "classification",
num_terms = tune(),
prod_degree = tune(),
prune_method = tune,
engine = "earth"
)
set.seed(123)
flexible_wf <-
workflow() %>%
add_model(flexible_model) %>%
add_recipe(model_recipe)
flexible_wf
flexible_results <-
flexible_wf %>%
tune_grid(resamples = heart_cv,
metrics = metric_set(accuracy)
)
error:
Fold01: preprocessor 1/1, model 1/10: Error:
prune_method
should be a single string value
What could be the reason for this?
Upvotes: 0
Views: 129
Reputation: 27
flexible_model <-
discrim_flexible( mode = "classification",
num_terms = tune(),
prod_degree = tune(),
prune_method = tune(), # <--- change
engine = "earth"
)
Upvotes: 2