metric_list_handler: Collect multiple metrics at once

View source: R/metric_list_handler.R

metric_list_handlerR Documentation

Collect multiple metrics at once

Description

A convenience function that collects all given metrics at once. This can save time compared to manually calling all metric functions individually, as some variables can be reused instead of being calculated multiple times.

Usage

metric_list_handler(fit, metrics, data_gen_output, fit_conf, ...)

Arguments

fit

A brmsfit object.

metrics

A vector of metric identifiers. See details for supported identifiers.

Details

Currently, the following identifiers are supported. See linked functions for required additional arguments:

  • "bias": posterior_bias

  • "divergents": divergents

  • "ess": ess

  • "elpd_loo": elpd_loo

  • "elpd_newdata": elpd_newdata

  • "epred": epred

  • "mae_s":

  • "p_mean": p_mean

  • "p_sd": p_sd

  • "pareto_k":

  • "pos_prob":

  • "ppred":

  • "pq":

  • "q_true":

  • "r2_loo":

  • "r2_newdata":

  • "residuals":

  • "rhat":

  • "rmse_loo":

  • "rmse_newdata":

  • "rmse_s":

  • "rstar":

  • "time_sampling":

  • "time_total":

  • "time_warmup":

  • "y":

Note,that not all identifiers are supported for each input class.

Value

A named list containing all requested metrics' results.


sims1253/bayesim documentation built on Aug. 13, 2024, 5:59 p.m.