-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Wondering if you would be interested in adding something like this:
get_best_model_parameters <- function(workflowset_results, rank_metic){
best_model <- workflowset_results %>%
rank_results(rank_metric = rank_metic, select_best = T) %>%
filter(.metric == rank_metic) %>%
filter(rank == 1)
workflowset_results %>%
filter(wflow_id == best_model$wflow_id) %>%
select(wflow_id, info) %>%
tidyr::unnest(info) %>%
select(wflow_id, preproc, model) %>%
bind_cols(
workflowset_results %>%
extract_workflow_set_result(id = best_model$wflow_id) %>%
select_best(metric = rank_metic) %>%
select(-.config)
)
}
In other words, a way to figure out what the best model hyperparameters are. Although as I think about this, maybe even a more general method for finding model parameters:
get_model_parameters <- function(workflowset_results, rank_metic, select_best =T, rank = 1){
best_model <- workflowset_results %>%
rank_results(rank_metric = rank_metic, select_best = select_best ) %>%
filter(.metric == rank_metic) %>%
filter(rank == 1)
workflowset_results %>%
filter(wflow_id == best_model$wflow_id) %>%
select(wflow_id, info) %>%
tidyr::unnest(info) %>%
select(wflow_id, preproc, model) %>%
bind_cols(
workflowset_results %>%
extract_workflow_set_result(id = best_model$wflow_id) %>%
select_best(metric = rank_metic) %>%
select(-.config)
)
}
Then it defaults to giving the best model parameters, however, the user is able to select other models?
Metadata
Metadata
Assignees
Labels
No labels