egobox
Library Listed
A python binding for egobox crates
- Downloads
- 26
- Dependents
- 2
- Stars
- 194
- Forks
- 13
- Contributors
- 8
- Commits
- 915
- Latest release
- 1.0.1 ·
About

EGObox - Efficient Global Optimization toolbox
Rust toolbox for Efficient Global Optimization method (arguably the most well-known bayesian optimization algorithm) which adresses the gradient-free optimization of expensive objective functions.
EGObox is twofold:
- for end-users: a Python module, the Python binding of the optimizer named
Egorand the surrogate modelGpx, mixture of Gaussian processes, written in Rust. - for developers: a set of Rust libraries useful to implement bayesian optimization (EGO-like) algorithms,
The Python module
Installation
pip install egobox
Egor optimizer
import numpy as np
import egobox as egx
# Objective function
def f_obj(x: np.ndarray) -> np.ndarray:
return (x - 3.5) * np.sin((x - 3.5) / (np.pi))
# Minimize f_opt in [0, 25]
optim = egx.Egor([[0.0, 25.0]]).minimize(f_obj, max_iters=20, seed=42)
print(f"Optimization f={optim.result.y_opt} at {optim.result.x_opt}") # Optimization f=[-15.12510323] at [18.93525454]
See also this example written in Rust
Read the full README
Gpx surrogate model
import numpy as np
import matplotlib.pyplot as plt
import egobox as egx
# Training
xtrain = np.array([0.0, 1.0, 2.0, 3.0, 4.0])
ytrain = np.array([0.0, 1.0, 1.5, 0.9, 1.0])
gpx = egx.Gpx.builder().fit(xtrain, ytrain)
# Prediction
xtest = np.linspace(0, 4, 100).reshape((-1, 1))
ytest = gpx.predict(xtest)
# Plot
plt.plot(xtest, ytest)
plt.plot(xtrain, ytrain, "o")
plt.show()
See also this example written in Rust
See the tutorial notebooks and examples folder for more information on the usage of the optimizer and mixture of Gaussian processes surrogate model.
The Rust libraries
egobox Rust libraries consists of the following sub-packages.
| Name | Version | Documentation | Description |
|---|---|---|---|
| doe | sampling methods; contains LHS, FullFactorial, Random methods | ||
| gp | gaussian process regression; contains Kriging, PLS dimension reduction and sparse methods | ||
| moe | mixture of experts using GP models | ||
| ego | efficient global optimization with constraints, mixed integer handling and multi-objective optimization (experimental) |
Usage
Depending on the sub-packages you want to use, you have to add following declarations to your Cargo.toml
[dependencies]
egobox-doe = { version = "0.x.y" }
egobox-gp = { version = "0.x.y" }
egobox-moe = { version = "0.x.y" }
egobox-ego = { version = "0.x.y" }
Features
The table below presents the various features available depending on the subcrate
| Name | doe | gp | moe | ego |
|---|---|---|---|---|
| serializable | ✔️ | ✔️ | ||
| persistent | ✔️ | |||
| blas | ✔️ | ✔️ | ✔️ | |
| c-cobyla | ✔️ | ✔️ | ✔️ | |
| c-slsqp | ✔️ |
Note: moe and ego models are always serializable and can be saved/loaded (json or binary format).
serializable
When selected, the serialization with serde crate is enabled.
persistent
When selected, the save and load as a json file with serde_json crate is enabled.
blas
When selected, the usage of BLAS/LAPACK backend is possible, see below for more information.
c-cobyla, c-slsqp
By default, Basin pure Rust optimizers are used: COBYLA for GP hyperparameters
training (gp, moe) and COBYLA/SLSQP for infill criterion optimization (ego), which also always
uses Basin to execute the EGO loop.
When selected, c-cobyla (resp. c-slsqp) uses the cobyla
(resp. slsqp) crate, a C-ported NLopt implementation, instead of
the Basin one. These features are also available on egobox-gpx and the Python package. See
Basin integration for build commands, checkpoint behavior, and
reproducible comparisons.
Examples
Examples (in examples/ sub-packages folder) are run as follows:
cd doe && cargo run --example samplings --release
cd gp && cargo run --example kriging --release
cd moe && cargo run --example clustering --release
cd ego && cargo run --example ackley --release
cd ego && cargo run --example zdt1 --release # multi-objective optimization
BLAS/LAPACK backend (optional)
egobox relies on linfa project for methods like clustering and dimension reduction, but also try to adopt as far as possible the same coding structures.
As for linfa, the linear algebra routines used in gp, moe ad ego are provided by the pure-Rust linfa-linalg crate, the default linear algebra provider.
Otherwise, you can choose an external BLAS/LAPACK backend available through the ndarray-linalg crate. In this case, you have to specify the blas feature and a linfa BLAS/LAPACK backend feature (more information in linfa features).
Thus, for instance, to use gp with the Intel MKL BLAS/LAPACK backend, you could specify in your Cargo.toml the following features:
[dependencies]
egobox-gp = { version = "0.x.y", features = ["blas", "linfa/intel-mkl-static"] }
or you could run the gp example as follows:
cd gp && cargo run --example kriging --release --features blas,linfa/intel-mkl-static
Citation
If you find this project useful for your research, you may cite it as follows:
@article{
Lafage2022,
author = {Rémi Lafage},
title = {EGObox, a Rust toolbox for efficient global optimization},
journal = {Journal of Open Source Software}
year = {2022},
doi = {10.21105/joss.04737},
url = {https://doi.org/10.21105/joss.04737},
publisher = {The Open Journal},
volume = {7},
number = {78},
pages = {4737},
}
Additionally, you may consider adding a star to the repository. This positive feedback improves the visibility of the project.
References
Bartoli, N., Lefebvre, T., Dubreuil, S., Olivanti, R., Priem, R., Bons, N., Martins, J. R. R. A., & Morlier, J. (2019). Adaptive modeling strategy for constrained global optimization with application to aerodynamic wing design. Aerospace Science and Technology, 90, 85–102.
Bouhlel, M. A., Bartoli, N., Otsmane, A., & Morlier, J. (2016). Improving kriging surrogates of high-dimensional design models by partial least squares dimension reduction. Structural and Multidisciplinary Optimization, 53(5), 935–952.
Bouhlel, M. A., Hwang, J. T., Bartoli, N., Lafage, R., Morlier, J., & Martins, J. R. R. A. (2019). A python surrogate modeling framework with derivatives. Advances in Engineering Software, 102662.
Dubreuil, S., Bartoli, N., Gogu, C., & Lefebvre, T. (2020). Towards an efficient global multi-disciplinary design optimization algorithm Structural and Multidisciplinary Optimization, 62(4), 1739–1765.
Jin, R. and Chen, W. and Sudjianto, A. (2005). An efficient algorithm for constructing optimal design of computer experiments Journal of Statistical Planning and Inference, 134:268-287.
Bettebghor, Dimitri, et al. (2011). Surrogate modeling approximation using a mixture of experts based on EM joint estimation Structural and multidisciplinary optimization 43.2 (2011): 243-259.
Jones, D. R., Schonlau, M., & Welch, W. J. (1998). Efficient global optimization of expensive black-box functions. Journal of Global Optimization, 13(4), 455–492.
Knowles, J. (2006). ParEGO: a hybrid algorithm with on-line landscape approximation for expensive multiobjective optimization problems. IEEE Transactions on Evolutionary Computation, 10(1), 50–66.
Zhan, D., Cheng, Y., & Liu, J. (2017). Expected improvement matrix-based infill criteria for expensive multiobjective optimization. IEEE Transactions on Evolutionary Computation, 21(6), 956–975.
Emmerich, M. T. M., Giannakoglou, K. C., & Naujoks, B. (2006). Single- and multiobjective evolutionary optimization assisted by Gaussian random field metamodels. IEEE Transactions on Evolutionary Computation, 10(4), 421–439.
Daulton, S., Balandat, M., & Bakshy, E. (2020). Differentiable Expected Hypervolume Improvement for Parallel Multi-Objective Bayesian Optimization. Advances in Neural Information Processing Systems 33 (NeurIPS 2020), 9851–9864.
Diouane, Youssef, et al. (2023). TREGO: a trust-region framework for efficient global optimization. Journal of Global Optimization 86.1 (2023): 1-23.
Diouane, Y., El Hallaoui, I., Kadri, M., & Lamghari, A. (2026). STREGO: A Scalable Implementation of a Trust-Region Framework for Noisy Bayesian Optimization. arXiv:2610.14338.
Priem, Rémy, Nathalie Bartoli, and Youssef Diouane. (2019) On the use of upper trust bounds in constrained Bayesian optimization infill criteria. AIAA aviation 2019 forum. 2019.
Sasena M., Papalambros P., Goovaerts P., (2002). Global optimization of problems with disconnected feasible regions via surrogate modeling. AIAA Paper.
Ginsbourger, D., Le Riche, R., & Carraro, L. (2010). Kriging is well-suited to parallelize optimization
E.C. Garrido-Merchan and D. Hernandez-Lobato. Dealing with categorical and integer-valued variables in Bayesian Optimization with Gaussian processes.
Zhan, Dawei, et al. (2024). A cooperative approach to efficient global optimization. Journal of Global Optimization 88.2 (2024): 327-357
Lisa Pretsch et al. (2025). Bayesian optimization of cooperative components for multi-stage aero-structural compressor blade design. Struct Multidisc Optim 68, 84 (2025)
Appriou, T., Rullière, D. & Gaudrie, D, (2024) Combination of optimization-free kriging models for high-dimensional problems, Comput Stat 39, 3049–3071 (2024).
S. Ament, S. Daulton, D. Eriksson, M. Balandat, E. Bakshy, (2023). Unexpected improvements to expected improvement for bayesian optimization, Advances in Neural Information Processing Systems, 2023
Marrel, A., & Iooss, B. (2024). Probabilistic surrogate modeling by Gaussian process: A review on recent insights in estimation and validation. Reliability Engineering & System Safety, 247, 110094.
Bussemaker, Jasper H., et al. (2024). Surrogate-based optimization of system architectures subject to hidden constraints. AIAA Aviation forum and Ascend 2024.
Tfaily, Ali, et al. (2024). Bayesian optimization with hidden constraints for aircraft design. Structural and Multidisciplinary Optimization 67.7 (2024): 123.
Larsson, J. (2026). Basin: Efficient and Extensible Numerical Optimization in Rust. arXiv:2608.11279. basin.rs
Marchildon, A. (2026). GpFlash: Maximizing Speed and Minimizing Memory for Gaussian Process Training and Prediction. arXiv:2610.16861.
smtorg. (2018). Surrogate modeling toolbox. GitHub.
License
Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0
Compatibility
- Runs on
- GPU support unknown
What shows it
- no dependency or feature matches a backend row
- Native code
- Optional
- Binds native code: lapack-sys (feature blas)
- Python bindings
- Has Python bindings
- egobox needs Python
- License
- Apache-2.0
Compare with similar projects
Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.
| Project | Downloads | Dependents | Stars | Latest release | Runs on (GPU) | Native code | License |
|---|---|---|---|---|---|---|---|
|
A python binding for egobox crates Python bindings |
26 downloads over 30 days | 2 | 194 | 1.0.1 | GPU support unknown | Binds native code: lapack-sys (feature blas) | Apache-2.0 |
|
linfa Featured
A Machine Learning framework for Rust |
177,963 downloads over 30 days | 60 | 4,770 | 0.8.1 | GPU support unknown | Binds native code: lapack-sys (feature intel-mkl-static) | Apache-2.0 OR MIT |
|
leiden-rs Listed
High-performance Leiden community detection algorithm for graphs in Rust |
41,983 downloads over 30 days | 10 | Not measured | 0.8.1 | GPU support unknown | No native code found | Apache-2.0 OR MIT |
|
anofox-regression Listed
A robust statistics library for regression analysis |
8,310 downloads over 30 days | 6 | 8 | 0.12.2 | GPU support unknown | No native code found | MIT |
|
augurs Listed
A time-series toolkit for forecasting, outlier detection, clustering and more. |
7,507 downloads over 30 days | 8 | 580 | 0.10.3 | GPU support unknown | No native code found | Apache-2.0 OR MIT |
|
A Rust implementation of the Leiden algorithm for community detection in large networks. |
1,765 downloads over 30 days | 1 | 1 | 0.1.0 | GPU support unknown | No native code found | MIT |
|
treeboost Listed
Gradient-boosted decision trees for tabular data: trains a baseline model in one call, with full control over boosting modes and configs, and Scalar, AVX-512, SVE2, WGPU and CUDA backends. Python bindings |
18 downloads over 30 days | 0 | 9 | 0.1.2 | CUDA, WebGPU | No native code found | Apache-2.0 |
Why ListedNo archive, New or Featured rule places it, so it is Listed.
What it lacks for Featured
- It has 2 active dependents and 1 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days. The repository route reads 194 stars, 13 forks and 8 contributors. It needs 4,539 stars, 434 forks and 79 contributors together.
What else the check found
- The last activity is on 6 Nov 2026, 3 days ago. The rules expect an update within 365 days. Dormancy rule
- The latest release requires the deprecated dependency bincode. RUSTSEC-2025-0141 Rot signals rule
Exact rules: Listed, Featured library. The check on applied thresholds version 9.
Every rule outcome, as the check records it
expected-interval: version 1.0.1 base 300, capped at 4 releases = 200, raised to the 365-day floor: E = 365 daysdormancy: last activity 2026-11-06, 3 days ago, E = 365: activerot: deprecated requirement `bincode (RUSTSEC-2025-0141, https://rustsec.org/advisories/RUSTSEC-2025-0141.html)`featured: not featured: active_users 2 < 11 and new_adopters 1 < 9 and repository route stars 194 (needs 4539), forks 13 (needs 434), contributors 8 (needs 79)listed: listed: no archive, new or featured rule applies
Crates7 crates
Measurements and sources
Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.
Sources6 sources
- Description: the crates.io description
- crates.io database dump, fetched
- RustSec advisory database, fetched
- GitHub repository, fetched
- crates.io package, fetched
- GitHub contributors, fetched
Adoption2 active dependents, 1 new dependents in 365 days1 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Active dependents | 2 | crates.io database dump | Yes | |
| New dependents (365 days) | 1 | crates.io database dump | Yes | |
| Peak active dependents | 2 | crates.io database dump | Yes | |
| Active dependents as a share of the peak | 1 | crates.io database dump | Yes | |
| Binary downloads per release | Not measured | Yes |
MaintenanceLatest human commit: 3 days ago3 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Latest human commit | 2026-11-06 | GitHub repository | Yes | |
| Latest release | 2026-11-06 | crates.io database dump | Yes | |
| First release | 2022-04-12 | crates.io database dump | Yes | |
| Latest version | 1.0.1 | crates.io database dump | Yes | |
| Days the oldest outside issue waits for a reply | 4 | GitHub repository | Yes | |
| Maintainer replies over 365 days | 37 | GitHub repository | Yes | |
| Repository archived | false | GitHub repository | Yes | |
| Repository gone | false | GitHub repository | Yes | |
| Release commit or manifest in the repo | true | crates.io package | Yes | |
| Published docs | true | crates.io database dump | Yes | |
| Latest release fails cargo check | Not measured | Yes | ||
| Build check date | Not measured | Yes | ||
| Build check toolchain | Not measured | Yes |
SecurityUnpatched vulnerabilities: none
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Unpatched vulnerabilities past the grace window | none | RustSec advisory database | Yes | |
| RustSec unmaintained advisory | none | RustSec advisory database | Yes | |
| Deprecation notice | none | crates.io database dump | Yes | |
| Deprecated requirement | bincode (RUSTSEC-2025-0141, https://rustsec.org/advisories/RUSTSEC-2025-0141.html) | crates.io database dump | Yes |
Distribution4 releases, 26 downloads over 30 days5 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | 4 | crates.io database dump | Yes | |
| Downloads over 30 days | 26 | crates.io database dump | Yes | |
| Binary downloads over the last 3 releases | Not measured | Yes | ||
| Homebrew installs on request over 365 days | Not measured | Yes | ||
| Repology repository families | Not measured | Yes | ||
| Docker pull growth over 90 days | Not measured | Yes | ||
| Docker pulls at the growth baseline | Not measured | Yes | ||
| Every version a prerelease | false | crates.io database dump | Yes | |
| Every version 0.0.x | false | crates.io database dump | Yes | |
| Every version yanked | false | crates.io database dump | Yes | |
| Crate deleted from crates.io | false | crates.io database dump | Yes |
Repository194 stars, 13 forks, 8 contributors, 915 commits. Stars alone never qualify a project.
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 194 | GitHub repository | Yes — one part of the repository route | |
| GitHub forks | 13 | GitHub repository | Yes — one part of the repository route | |
| Contributors with a GitHub account | 8 | GitHub contributors | Yes — one part of the repository route | |
| Commits on the default branch | 915 | GitHub repository | No | |
| Repository's main crate left out of the entry | none | crates.io database dump | Yes |
Facts that never count
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| License | Apache-2.0 | crates.io database dump | No | |
| Runs on, from listed crates and their direct dependencies | GPU support unknown | crates.io database dump | No | |
| What shows each backend | no dependency or feature matches a backend row | crates.io database dump | No | |
| Native code, from listed crates and their dependencies | Binds native code: lapack-sys (feature blas) | crates.io database dump | No | |
| Python bindings, from direct dependencies of listed crates | Has Python bindings: egobox needs Python | crates.io database dump | No | |
| Crates that depend on a listed crate directly | 2 | crates.io database dump | No |
Corrections and review history
No correction applies to this entry.
Judgments
A judgment enters only through an approved issue and a merged pull request.
No judgment applies to this entry.