Add `coverage()` accuracy metric
mitchelloharawild opened this issue · comments
Mitchell O'Hara-Wild commented
coverage <- function(.dist, .actual, percentile = 80, na.rm = TRUE, ...){
intvl <- hilo(.dist, percentile)
within <- (.actual > intvl$lower) & (.actual < intvl$upper)
mean(within)
}