#include <gpr/ml/laplace/PsisLaplace.h>
Public Attributes | |
| Eigen::VectorXd | theta_map |
| Eigen::MatrixXd | proposal_cov_chol |
| std::vector< Eigen::VectorXd > | theta_samples |
| std::vector< Eigen::VectorXd > | alpha_samples |
| std::vector< double > | weights |
| std::vector< double > | log_weights_raw |
| double | k_hat = 0.0 |
| bool | reliable = false |
| int | n_target_evals = 0 |
| bool | valid = false |
| True iff the cache contains usable n_samples samples. | |
State and diagnostics from one PSIS-Laplace fit. Mirrors SliceSamplerState's shape so the same downstream predict path (runSliceLaplacePredict) can consume both with a uniform interface.
Definition at line 93 of file PsisLaplace.h.
| std::vector<Eigen::VectorXd> gpr::laplace::PsisLaplaceState::alpha_samples |
Cached alpha_k = K(theta_k)^-1 y for each sample. Populated by the alpha_fn callback the caller supplies.
Definition at line 104 of file PsisLaplace.h.
| double gpr::laplace::PsisLaplaceState::k_hat = 0.0 |
Fitted Pareto shape parameter on the upper-tail of the weight distribution (Hill-style estimator). > 0.7 -> proposal misses the posterior tail and reliable is false.
Definition at line 116 of file PsisLaplace.h.
| std::vector<double> gpr::laplace::PsisLaplaceState::log_weights_raw |
Raw log-weights log p(theta_k | y) - log q(theta_k) before stabilisation / normalisation. Kept for diagnostics.
Definition at line 112 of file PsisLaplace.h.
| int gpr::laplace::PsisLaplaceState::n_target_evals = 0 |
Total number of NLML evaluations made (== K when every log_target call succeeds; less if some failed).
Definition at line 122 of file PsisLaplace.h.
| Eigen::MatrixXd gpr::laplace::PsisLaplaceState::proposal_cov_chol |
Definition at line 98 of file PsisLaplace.h.
| bool gpr::laplace::PsisLaplaceState::reliable = false |
True iff k_hat <= options.k_hat_threshold AND every sample's log_target evaluation succeeded.
Definition at line 119 of file PsisLaplace.h.
| Eigen::VectorXd gpr::laplace::PsisLaplaceState::theta_map |
Proposal mean (theta_MAP) and lower-triangular Cholesky of H^{-1} (the proposal covariance). Stored so the predict can recompute log q(theta_k) on demand.
Definition at line 97 of file PsisLaplace.h.
| std::vector<Eigen::VectorXd> gpr::laplace::PsisLaplaceState::theta_samples |
K importance samples (in the same nat-log hyperparameter coordinates the SCG / slice paths use).
Definition at line 101 of file PsisLaplace.h.
| bool gpr::laplace::PsisLaplaceState::valid = false |
True iff the cache contains usable n_samples samples.
Definition at line 124 of file PsisLaplace.h.
| std::vector<double> gpr::laplace::PsisLaplaceState::weights |
PSIS-smoothed self-normalised importance weights, sum == 1. weights[k] is what the predict path multiplies the per-sample (mean, variance) contribution by. Uniform = 1/K when the proposal exactly matches the target.
Definition at line 109 of file PsisLaplace.h.