itertracer_callbacks: itertracer] Callback Functions

Description Usage Arguments Details

View source: R/itertracer.R

Description

Handle callback functions passed to itertracer].

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
itertracer_callbacks_defaults()

itertracer_callbacks(
  sample_chains = NULL,
  on_init = NULL,
  param_order = NULL,
  on_iter_start = NULL,
  save_iter = NULL,
  on_iter_finish = NULL,
  break_if = NULL,
  on_chain_completion = NULL,
  on_sampling_completion = NULL,
  on_exit = NULL
)

Arguments

sample_chains

function to go through the separate chains; e.g. an application of parallel::mclapply

on_init

called on initiation of itertracer]

param_order

when stepping through parameters within an iteration, this function is called to determine the order of the parameters

on_iter_start

called on start of an iteration before anything else

save_iter

called to save the result of an iteration

on_iter_finish

called on finishing an iteration

break_if

iterating is terminated when this function returns TRUE; you can e.g. set a maximum time this way

on_chain_completion

called when all the iterations have been completed in a chain

on_sampling_completion

called when all chains have finished / have been interrupted

on_exit

called on exit even when an error is raised by using on.exit

Details


WetRobot/tracer documentation built on Aug. 7, 2020, 10:53 p.m.