Skip to contents

Convert in-memory BART model objects (forests, random effects, vectors) to in-memory JSON. This function is primarily a convenience function for serialization / deserialization in a parallel BART sampler.

Usage

convertBARTStateToJson(
  param_list,
  mean_forest = NULL,
  variance_forest = NULL,
  rfx_samples = NULL,
  global_variance_samples = NULL,
  local_variance_samples = NULL
)

Arguments

param_list

List containing high-level model state parameters

mean_forest

Container of conditional mean forest samples (optional). Default: NULL.

variance_forest

Container of conditional variance forest samples (optional). Default: NULL.

rfx_samples

Container of random effect samples (optional). Default: NULL.

global_variance_samples

Vector of global error variance samples (optional). Default: NULL.

local_variance_samples

Vector of leaf scale samples (optional). Default: NULL.

Value

Object of type CppJson