ngme_sgld_samples: Extract Posterior-like Samples from Stored SGLD Trajectories

View source: R/batch-means.R

ngme_sgld_samplesR Documentation

Extract Posterior-like Samples from Stored SGLD Trajectories

Description

Build posterior-like samples from optimizer trajectories by dropping an initial burn-in segment and applying thinning.

Usage

ngme_sgld_samples(
  ngme,
  name = "all",
  burnin_iter = 0,
  thinning = 1,
  apply_transform = TRUE,
  combine_chains = TRUE
)

Arguments

ngme

fitted 'ngme' object with 'store_traj = TRUE'.

name

parameter block to extract: '"all"' (default), latent model name, or '"general"'.

burnin_iter

non-negative integer. Number of initial iterations to discard before sampling.

thinning

positive integer thinning interval.

apply_transform

logical; apply parameter transforms to user scale.

combine_chains

logical; if 'TRUE', return one combined data.frame, otherwise return one data.frame per chain.

Value

A data.frame (or list of data.frames when 'combine_chains = FALSE') with columns '.chain', '.draw', '.iter', and one column per parameter.


ngme2 documentation built on May 20, 2026, 9:10 a.m.