R/get_opt_threshold.R

Defines functions get_opt_threshold

get_opt_threshold <- function(df_profile_performance){
  out <- purrr::map(df_profile_performance, "df_metrics") %>% 
    bind_rows(.id = "threshold") %>% 
    arrange(-diff_ratio_dry_moist) %>% 
    slice(1:3) %>% 
    arrange(rmse_nnpot_nnact_moist) %>% 
    slice(1) %>% 
    pull(threshold) %>% 
    as.numeric()
  return(out)
}
stineb/fvar documentation built on Oct. 15, 2022, 12:06 p.m.