-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Labels
upkeepmaintenance, infrastructure, and similarmaintenance, infrastructure, and similar
Description
When reviewing #994 I noticed that we have outcome_names() with methods for different objects and also .get_tune_outcome_names() (as part of various .get_tune_*() functions).
We can consolidate .get_tune_outcome_names() with outcome_names.tune_results():
Lines 53 to 63 in a8f0c05
| #' @export | |
| #' @rdname outcome_names | |
| outcome_names.tune_results <- function(x, ...) { | |
| att <- attributes(x) | |
| if (any(names(att) == "outcomes")) { | |
| res <- att$outcomes | |
| } else { | |
| res <- NA_character_ | |
| } | |
| res | |
| } |
Lines 208 to 218 in a8f0c05
| #' @export | |
| #' @rdname tune_accessor | |
| .get_tune_outcome_names <- function(x) { | |
| x <- attributes(x) | |
| if (any(names(x) == "outcomes")) { | |
| res <- x$outcomes | |
| } else { | |
| res <- character(0) | |
| } | |
| res | |
| } |
Metadata
Metadata
Assignees
Labels
upkeepmaintenance, infrastructure, and similarmaintenance, infrastructure, and similar