View source: R/metric_list_handler.R
metric_list_handler | R Documentation |
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.
metric_list_handler(fit, metrics, data_gen_output, fit_conf, ...)
fit |
A brmsfit object. |
metrics |
A vector of metric identifiers. See details for supported identifiers. |
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.
A named list containing all requested metrics' results.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.