Loading...
Searching...
No Matches
gpr::laplace::SliceSamplerState Struct Reference

#include <gpr/ml/laplace/SliceSampler.h>

Public Attributes

std::vector< Eigen::VectorXd > theta_samples
std::vector< Eigen::VectorXd > alpha_cache
int n_steps = 0
 Total slice steps taken (including burn-in).
int n_target_evals = 0
int n_accepted = 0
 Number of accepted proposals (for acceptance-rate diagnostics).
int n_stuck = 0
 Number of stuck steps (max_shrinks reached without accepting).
bool valid = false

Detailed Description

Diagnostics + cached state from a slice-sampling run. Persists for the duration of one outer dimer iteration's predict bursts; the caller is expected to invalidate when the underlying training data, kernel state, or hyperparameter MAP shifts beyond a threshold.

Definition at line 76 of file SliceSampler.h.

Member Data Documentation

◆ alpha_cache

std::vector<Eigen::VectorXd> gpr::laplace::SliceSamplerState::alpha_cache

Cached alpha_k = K(theta_k)^-1 y for each retained sample. Empty if the caller chose not to cache (alpha_fn was null in the sample() call).

Definition at line 83 of file SliceSampler.h.

◆ n_accepted

int gpr::laplace::SliceSamplerState::n_accepted = 0

Number of accepted proposals (for acceptance-rate diagnostics).

Definition at line 90 of file SliceSampler.h.

◆ n_steps

int gpr::laplace::SliceSamplerState::n_steps = 0

Total slice steps taken (including burn-in).

Definition at line 85 of file SliceSampler.h.

◆ n_stuck

int gpr::laplace::SliceSamplerState::n_stuck = 0

Number of stuck steps (max_shrinks reached without accepting).

Definition at line 92 of file SliceSampler.h.

◆ n_target_evals

int gpr::laplace::SliceSamplerState::n_target_evals = 0

Total target-function evaluations (NLML calls = Cholesky factorisations). Diagnostics for the per-fit burst cost.

Definition at line 88 of file SliceSampler.h.

◆ theta_samples

std::vector<Eigen::VectorXd> gpr::laplace::SliceSamplerState::theta_samples

n_samples posterior samples in theta-space (nat-log hyperparameter coordinates).

Definition at line 79 of file SliceSampler.h.

◆ valid

bool gpr::laplace::SliceSamplerState::valid = false

True iff the cache contains usable n_samples samples and is safe to read. Cleared by the caller on data-update.

Definition at line 95 of file SliceSampler.h.


The documentation for this struct was generated from the following file: