Skip to main content

A toolbox for efficient global optimization

Project description

egobox

tests pytests linting DOI

Rust toolbox for Efficient Global Optimization algorithms inspired from SMT.

egobox is twofold:

  1. for end-users: a Python module, the Python binding of the optimizer named Egor and the surrogate model Gpx, mixture of Gaussian processes, written in Rust.
  2. for developers: a set of Rust libraries useful to implement bayesian optimization (EGO-like) algorithms,

The Python module

Thanks to the PyO3 project, which makes Rust well suited for building Python extensions. You can install the Python package using:

$ pip install egobox

See the tutorial notebooks for 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 crates.io docs sampling methods; contains LHS, FullFactorial, Random methods
gp crates.io docs gaussian process regression; contains Kriging and PLS dimension reduction
moe crates.io docs mixture of experts using GP models
ego crates.io docs efficient global optimization with basic constraints and mixed integer handling

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.10.0" }
egobox-gp  = { version = "0.10.0" }
egobox-moe = { version = "0.10.0" }
egobox-ego = { version = "0.10.0" }

Features

serializable-gp

The serializable-gp feature enables the serialization of GP models using the serde crate.

persistent-moe

The persistent-moe feature enables save() and load() methods for MoE model to/from a json file using the serde crate.

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

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.10.0", 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

DOI

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

egobox-0.10.1.tar.gz (772.1 kB view details)

Uploaded Source

Built Distributions

egobox-0.10.1-cp311-none-win_amd64.whl (5.1 MB view details)

Uploaded CPython 3.11 Windows x86-64

egobox-0.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

egobox-0.10.1-cp310-none-win_amd64.whl (5.1 MB view details)

Uploaded CPython 3.10 Windows x86-64

egobox-0.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

egobox-0.10.1-cp39-none-win_amd64.whl (5.1 MB view details)

Uploaded CPython 3.9 Windows x86-64

egobox-0.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

egobox-0.10.1-cp38-none-win_amd64.whl (5.1 MB view details)

Uploaded CPython 3.8 Windows x86-64

egobox-0.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

egobox-0.10.1-cp37-none-win_amd64.whl (5.1 MB view details)

Uploaded CPython 3.7 Windows x86-64

File details

Details for the file egobox-0.10.1.tar.gz.

File metadata

  • Download URL: egobox-0.10.1.tar.gz
  • Upload date:
  • Size: 772.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.8.5

File hashes

Hashes for egobox-0.10.1.tar.gz
Algorithm Hash digest
SHA256 e695d1095d161124c36cde3724cf206afcc4e1445cc4e4627144dea60f6b2c68
MD5 0125f9ec5d92ce7536158658baa0f4e3
BLAKE2b-256 41eae19e51d017763965b5f13870f6f1ab138bb2926db4751d69a1debe810eb4

See more details on using hashes here.

File details

Details for the file egobox-0.10.1-cp311-none-win_amd64.whl.

File metadata

  • Download URL: egobox-0.10.1-cp311-none-win_amd64.whl
  • Upload date:
  • Size: 5.1 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.8.5

File hashes

Hashes for egobox-0.10.1-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 c8306c7d3d4e4c31f92502b15a949ad8d9541bfd701c76d781a4c089f3582516
MD5 0c704c5ed37e8baa8740bc22b4a54162
BLAKE2b-256 326bf1292b9b5f0e29e2248ea775e8f2fc5644155946d5e18d4bdf9b03084c47

See more details on using hashes here.

File details

Details for the file egobox-0.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for egobox-0.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 01575d0227875f16522582c76d1670c03e9cae102ff61f54032502cf85dd1d61
MD5 bfded8f4464eea35b21927df0ffb8f1b
BLAKE2b-256 d65c237e2cc2dd1d9c409c32d7d181b7c06b165871018909dd5594710de51f55

See more details on using hashes here.

File details

Details for the file egobox-0.10.1-cp310-none-win_amd64.whl.

File metadata

  • Download URL: egobox-0.10.1-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 5.1 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.8.5

File hashes

Hashes for egobox-0.10.1-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 83bc99ed4a298ac6c37017f75c897212ef947201da8f75d0844eeb6d7ecef75f
MD5 cf1054b99a2e7e189984a71dede5aedc
BLAKE2b-256 500d52a866cc872c9b3f51b92a8ee1232407a734e624678af6b15f32abebd045

See more details on using hashes here.

File details

Details for the file egobox-0.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for egobox-0.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f8ad17f3c6244017376181bf6036a1dd78f2ba8d3d6beb93715164f1197884be
MD5 46fb5fbafceac027bbef4c58bf3ec63a
BLAKE2b-256 5f182a266bb8085b2c41d33a295300497322175e64fd0ea9c961e178abbfa517

See more details on using hashes here.

File details

Details for the file egobox-0.10.1-cp39-none-win_amd64.whl.

File metadata

  • Download URL: egobox-0.10.1-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 5.1 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.8.5

File hashes

Hashes for egobox-0.10.1-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 fff845726e01916ea75b11ae183d55877d9d2212e4d69ec34a43a292d1cea7a2
MD5 002d12c17cb6bf289e680572e7d2d11f
BLAKE2b-256 915a0edb5fef928050e7f5980677e019c84466ab6e98b7e22eea0688871e3d0c

See more details on using hashes here.

File details

Details for the file egobox-0.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for egobox-0.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8fe5def2ae99a705a97681241b467602afa0dde3de409b01c2b28620a6c39e3d
MD5 e27822a304a34ea23333e1685aaaedf6
BLAKE2b-256 9bdf1c7e9baeb4e5150d24900f7624733afbe023dfe607ff622c50bb3b647f0b

See more details on using hashes here.

File details

Details for the file egobox-0.10.1-cp38-none-win_amd64.whl.

File metadata

  • Download URL: egobox-0.10.1-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 5.1 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.8.5

File hashes

Hashes for egobox-0.10.1-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 f4630e71b3bda4cfa1de6135f9637263afe48b6b35f4ee8db6eb2123aab38993
MD5 420a02da1bdd695612a56274d74ac4d8
BLAKE2b-256 89f89f8bac09ca2e84c3404f4d55fdaf6786b14a3ada150c7d4dda4124c8b108

See more details on using hashes here.

File details

Details for the file egobox-0.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for egobox-0.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6ea4a1b3ab0e34c208783894e03d5896d036aad95a662775938cb5f6c5f90a18
MD5 6d3fb3efeaa5568f36ca0a964ba78f12
BLAKE2b-256 9c17e4c5f84ae73c4836415ad6854290f03725148cbfccc8a8501be4de0bdce6

See more details on using hashes here.

File details

Details for the file egobox-0.10.1-cp37-none-win_amd64.whl.

File metadata

  • Download URL: egobox-0.10.1-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 5.1 MB
  • Tags: CPython 3.7, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.8.5

File hashes

Hashes for egobox-0.10.1-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 35ee8ab05f6a9929462a6a8e99ca56ce6bffd623c223f5c1f0ba3d11569266a8
MD5 03c05769ea8517c6658f871f18435fa3
BLAKE2b-256 747379f5eb65b6cd78d45f291da26fc169cf7ddf19e7b34098d4cc5f76ca1ae5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page