Parameter Estimation, Surrogates, and Tooling for Optimisation
PESTO is a high-performance R package for model-independent parameter estimation and uncertainty quantification, built on modernised PEST++ algorithms with novel methodological extensions.
| Feature | Description |
|---|---|
| Fast ensemble solvers | C++ (RcppEigen) implementation of IES and GLM update equations |
| Adaptive SVD | Automatic backend selection: randomised SVD, LAPACK, or Eigen BDCSVD |
| Surrogate-accelerated IES | Gaussian Process surrogates reduce model evaluations by 50--90% |
| Adaptive ensemble sizing | ESS-based diagnostics prevent over/under-sampling |
| PEST++ integration | Read/write .pst control files, run PEST++ executables from R |
| Publication-ready plots | Convergence, ensemble distributions, identifiability, surrogate diagnostics |
# Install from GitHub
# install.packages("remotes")
remotes::install_github("AAGI-AUS/PESTO")- R >= 4.1.0
- C++17 compiler
- LAPACK/BLAS (provided by R)
library(PESTO)
# Create a parameter estimation scenario
pars <- data.table::data.table(
parnme = paste0("k", 1:10),
partrans = "log",
parchglim = "factor",
parval1 = runif(10, 0.1, 10),
parlbnd = 0.001,
parubnd = 1000,
pargp = "hydraulic"
)
obs <- data.table::data.table(
obsnme = paste0("h", 1:20),
obsval = rnorm(20, 5, 1),
weight = 1.0,
obgnme = "heads"
)
pst <- create_pest_scenario(pars, obs, "python model.py")
write_pst(pst, "model.pst")
# Core computational kernels (no PEST++ binary needed)
set.seed(42)
npar <- 100; nobs <- 200; nreal <- 50
upgrade <- ensemble_solution(
par_diff = matrix(rnorm(npar * nreal), npar, nreal),
obs_diff = matrix(rnorm(nobs * nreal), nobs, nreal),
obs_resid = matrix(rnorm(nobs * nreal), nobs, nreal),
par_resid = matrix(rnorm(npar * nreal), npar, nreal),
weights = abs(rnorm(nobs)) + 0.1,
parcov_inv = abs(rnorm(npar)) + 0.1,
Am = matrix(rnorm(npar * (nreal - 1)), npar, nreal - 1),
cur_lam = 1.0
)Benchmarks on Apple Silicon (M-series) comparing PESTO's C++ kernel against a pure R implementation:
| Scale (params x obs x reals) | PESTO (ms) | R native (ms) | Speedup |
|---|---|---|---|
| 50 x 100 x 30 | 0.17 | 0.17 | 1.0x |
| 500 x 1000 x 50 | 1.45 | 2.59 | 1.8x |
| 2000 x 5000 x 100 | 22.3 | 64.0 | 2.9x |
Randomised SVD: 35x faster than full LAPACK at 2000x1000 for rank-20 approximation.
vignette("getting-started", package = "PESTO")-- Introduction and basic usagevignette("surrogate-ies", package = "PESTO")-- Surrogate-accelerated IES tutorial
citation("PESTO")Moldovan, M. (2026). PESTO: Parameter Estimation, Surrogates, and Tooling for Optimisation. R package version 0.1.0. https://github.com/AAGI-AUS/PESTO
GPL-3
