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)
)错误:
Fold01:预处理器1/1,模型1/10:错误:
prune_method应该是单个字符串值
这是什么原因?
发布于 2022-08-31 10:14:59
flexible_model <-
discrim_flexible( mode = "classification",
num_terms = tune(),
prod_degree = tune(),
prune_method = tune(), # <--- change
engine = "earth"
)https://stackoverflow.com/questions/73552736
复制相似问题