Skip to content

Commit

Permalink
Update R/score_model_out.R
Browse files Browse the repository at this point in the history
Co-authored-by: Zhian N. Kamvar <[email protected]>
  • Loading branch information
elray1 and zkamvar authored Sep 17, 2024
1 parent 19c6692 commit 99336ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/score_model_out.R
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ get_metrics <- function(forecast, output_type, select = NULL) {
level_str <- substr(metric, 19, nchar(metric))
level <- suppressWarnings(as.numeric(level_str))
if (is.na(level) || level <= 0 || level >= 100) {
stop(paste(
"Invalid interval coverage level:", level_str,
"- must be a number between 0 and 100 (exclusive)"
cli::cli_abort(c(
"Invalid interval coverage level: {level_str}",
"i" = "must be a number between 0 and 100 (exclusive)"
))
}
return(purrr::partial(scoringutils::interval_coverage, interval_range = level))
Expand Down

0 comments on commit 99336ec

Please sign in to comment.