chkpt_setup: Checkpoint Setup

View source: R/chkpt_setup.R

chkpt_setupR Documentation

Checkpoint Setup

Description

Deterimine the number of checkpoints for the warmup and sampling, given the desired number of iterations for each and the iterations per checkpoint.

Usage

chkpt_setup(iter_sampling, iter_warmup, iter_per_chkpt)

Arguments

iter_sampling

(positive integer) The number of post-warmup iterations to run per chain. Note: in the CmdStan User's Guide this is referred to as num_samples.

iter_warmup

(positive integer) The number of warmup iterations to run per chain. Note: in the CmdStan User's Guide this is referred to as num_warmup.

iter_per_chkpt

(positive integer) The number of iterations per check point.

Value

A list with the following:

  • warmup_chkpts: Number of warmup checkpoints

  • sample_chkpts: Number of sampling checkpoints

  • total_chkpts: Total number of checkpoints (warmup_chkpts + sample_chkpts)

  • iter_per_chkpt: Iterations per checkpoint

Examples

chkpt_setup <- chkpt_setup(
  iter_sampling = 5000,
  iter_warmup = 2000,
  iter_per_chkpt = 10
)

chkpt_setup

chkptstanr documentation built on April 29, 2022, 5:06 p.m.