
'libKriging' is a C++ library that provides most standard Kriging / Gaussian process features (fit, prediction, simulation, update) and many warping of input (affine, boxcox, kumaraswamy, neural_mono, knots, mlp, mlp_joint, categorical, ordinal).
It also supports large designs (n up to ~10^5-10^6) through the NestedKriging divide-and-conquer class (PoE/gPoE/BCM/rBCM and the optimal nested-kriging aggregation) and the Vecchia (method="vecchia(m)", with local prediction) and Nystrom low-rank (method="nystrom(k)") approximations of the log-likelihood fit (neither ever builds the exact O(n^3) factorization; the exact / Vecchia / Nystrom method is explicit at every step: fit / predict / simulate / logLikelihood take method="exact" (default), "vecchia" or "nystrom", see bindings/README.md), or by fitting on a k-means reduced design (subsetOfData).
It targets to provide a fast, robust and easy to use implementation of Kriging / Gaussian process regression for industrial applications of Machine Learning, Design of Experiments, Bayesian Optimization, etc.
'libKriging' relies on Armadillo linear algebra library (Apache 2 license) by Conrad Sanderson, and 'lbfgsb_cpp' which is a C++ port around by Pascal Have of 'lbfgsb' library (BSD-3 license) by Ciyou Zhu, Richard Byrd, Jorge Nocedal and Jose Luis Morales used for hyperparameters optimization.
Many bindings are available to use 'libKriging' from Python, R, Octave, Matlab and Julia. See Installation from pre-built packages for more details.
Upgrading from 1.x? Version 2.0 changes defaults (e.g. optim="BFGS4" for Kriging and MLPKriging), fitted results and some APIs (thread settings in Parallel, method= instead of the LLVecchia / LLNystrom objectives, ...): see the migration guide docs/Migration-2.0.md and the Breaking changes of CHANGELOG.md.
Features
- Models:
Kriging (noise_model: none, nugget, heterogeneous), WarpKriging (input warping), MLPKriging (MLP feature mapping), and NestedKriging for large designs.
- Covariance kernels:
gauss, exp, matern3_2, matern5_2.
- Fit objectives: log-likelihood (
LL), leave-one-out (LOO), log-marginal-posterior (LMP), computed exactly (method="exact", default) or, for LL, with the scalable approximations method="vecchia(m)" (Vecchia) and method="nystrom(k)" (Nystrom low-rank).
- Input warpings (
WarpKriging, one per input column): affine, boxcox, kumaraswamy, neural_mono, knots, mlp, categorical, ordinal; mlp_joint (a joint feature map over all inputs) through MLPKriging.
- Large designs:
NestedKriging, the vecchia(m) and nystrom(k) fit methods, and subsetOfData (k-means pre-fit row selection); see docs/math/Scalability.md.
- Operations: fit, predict, simulate, update, save/load, and cross-language model exchange.
- Bindings: Python, R, Octave, Matlab, Julia — see bindings/README.md for the full method reference.
- Python: scikit-learn compatible estimators (
pylibkriging.sklearn) for all four Kriging classes, usable in Pipeline/GridSearchCV.
Table of contents