check_learning_models: Diagnostic plots and fit metrics for training and test data...

View source: R/check_learning_models.R

check_learning_modelsR Documentation

Diagnostic plots and fit metrics for training and test data models

Description

This function is called automatically by fit_learning_model() when model_checks = TRUE, but can also be run separately if desired.

Usage

check_learning_models(
  draws,
  test = FALSE,
  mean_pars = TRUE,
  diagnostic_plots = TRUE,
  alpha_par_nms = NA,
  pal = NULL,
  font = "",
  font_size = 11
)

Arguments

draws

Post-warmup draws - either a posterior::draws_array(), a posterior::draws_list(), or a vector of file paths to the .csv output files. May also be a posterior::draws_df() but chain-by-chain diagnostics will not be possible.

test

Boolean indicating whether recovered parameters are from the test phase.

mean_pars

Output a plot of the mean parameters?

diagnostic_plots

Output diagnostic traces and histograms? Requires the bayesplot package.

alpha_par_nms

Option to rename learning rate parameters for models with more than one.

pal, font, font_size

Same as plot_import.

Value

Either a single or named list of ggplot objects.

Examples

## Not run: 
data(example_data)

fit <- fit_learning_model(
  example_data$nd,
  model = "2a",
  vb = FALSE,
  exp_part = "training"
 )
model_checks <-  check_learning_models(fit$draws)

## End(Not run)


qdercon/pstpipeline documentation built on June 1, 2025, 1:11 p.m.