Lightweight constructor for a posterior-predictive ensemble produced by
PESTO (or any compatible UQ engine). Bundles a posterior-predictive
sample matrix with optional held-out observations and free-form
metadata, providing a stable interface for mmd_ppc() and other
downstream verdict-layer tools.
Usage
pesto_ensemble(posterior, observed = NULL, metadata = list())Arguments
- posterior
Numeric matrix
M x d:Mposterior-predictive draws overdoutput dimensions (e.g. yield, biomass).- observed
Optional numeric matrix
n_obs x dof held-out observations. May beNULLwhen observations are supplied later tommd_ppc().- metadata
Optional named list of free-form metadata (run id, ensemble seed, holdout year, etc.).
Details
This is the kernR-side schema for the cross-package contract; until PESTO ships its native manifest emitter, callers can construct the object directly from in-memory matrices.
Examples
set.seed(1)
post <- matrix(stats::rnorm(200L), ncol = 2L)
obs <- matrix(stats::rnorm(20L), ncol = 2L)
ens <- pesto_ensemble(post, obs, metadata = list(holdout_year = 2018))
ens
#>
#> PESTO ensemble manifest
#>
#> Posterior: 100 draws x 2 dims
#> Observed: 10 obs x 2 dims
#> Metadata: holdout_year
#>
