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 developers: a set of Rust libraries useful to implement bayesian optimization (EGO-like) algorithms,
  2. for end-users: a Python module, the Python binding of the optimizer named Egor and the surrogate model Gpx, mixture of Gaussian processes.

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.8.0" }
egobox-gp  = { version = "0.8.0" }
egobox-moe = { version = "0.8.0" }
egobox-ego = { version = "0.8.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.8.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

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.

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.8.2.tar.gz (462.7 kB view details)

Uploaded Source

Built Distributions

egobox-0.8.2-cp310-none-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.10 Windows x86-64

egobox-0.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

egobox-0.8.2-cp39-none-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.9 Windows x86-64

egobox-0.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

egobox-0.8.2-cp38-none-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.8 Windows x86-64

egobox-0.8.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

egobox-0.8.2-cp37-none-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.7 Windows x86-64

egobox-0.8.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

File details

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

File metadata

  • Download URL: egobox-0.8.2.tar.gz
  • Upload date:
  • Size: 462.7 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.8.2.tar.gz
Algorithm Hash digest
SHA256 8687cf3c01bc9543c6095e689e77157562f0c22d2931c025e3ddf24465cc6eee
MD5 c2507433d17bd109b1c164aac770010e
BLAKE2b-256 2c27daa7243ef27f4af7c33674635637e96c93553aafa2302c086619afd81830

See more details on using hashes here.

File details

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

File metadata

  • Download URL: egobox-0.8.2-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 2.7 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.8.2-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 a847c241189e06d5ac2ddb794549fdad5b3364735e7eab7b8d2182f9a9e1b7af
MD5 d015ff2af67b7bab549c1b0b112f3b23
BLAKE2b-256 f66cab00bcf57a435c672280a5287529f229bb1233104616e666e027ab0b9b9c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for egobox-0.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 df1e99eb2ff70e3f74da9b26c27e9911596096d096b14fffc2793372e4b7857b
MD5 e6d00ba2e302fd6da4a99aa7cbabe938
BLAKE2b-256 be61c5a5e3292540e84961e1c3dc76cd324336ec52bd1e35f4d5b5020a50b7c0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: egobox-0.8.2-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 2.7 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.8.2-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 4172d54543eaec6d90d287941b2f07a9e8e369eb3e95d1985f7a14a3c944d92c
MD5 61aa5c0b8f96edcef7e2ac68be16d6f7
BLAKE2b-256 976e53caf849ae74d1b34af6efead256c49196abdd9a44ed837da6a673a3e629

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for egobox-0.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5233f422e1592fd86f05ba942857b854aa71321a4312acbaaf4fa0b40a7537d2
MD5 9d122590b1ad7a4b1d6c994542bca651
BLAKE2b-256 3758d3b7fce487129c1ee4354768ea427010a9cbff14d90569f9eafbc3b9e8f1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: egobox-0.8.2-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 2.7 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.8.2-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 f1e8498c923b48998fbe6dac5d55977813d9089927daaa40d7f66b99c03cede9
MD5 02194bc27bb84503c412f2e52b984ff2
BLAKE2b-256 9777fb34719799a07012e897f32e8f7179e72d7b5859a0352aeab1605265daf0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for egobox-0.8.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f3a5bcd2514c22b0b7e004667b782c5895815e4c524ad8329b7e7a27b6238409
MD5 657886b6f097117f3338ae0ee29f1ad5
BLAKE2b-256 d0fe42e08e22b95396528096d96e55275aa9e6404a351daf0b5e5fd8d82e6b15

See more details on using hashes here.

File details

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

File metadata

  • Download URL: egobox-0.8.2-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 2.7 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.8.2-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 d559cbbd472e3074c32f5d7ace3cfb750f897da2ded0e0cda999b199d90a29e0
MD5 a45cbccd857f200d449f717f259e0de0
BLAKE2b-256 5594ff85e6add32632d4ee77610aea63a66155173b6b67a1c7376a650d95e3b5

See more details on using hashes here.

File details

Details for the file egobox-0.8.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for egobox-0.8.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 07772a49a34235601a6120baa98ff98209235b7605994fafbc6b67c449f45107
MD5 1d2f9325f56ac02dee8e075b9c61a1b2
BLAKE2b-256 dd5df24ed98e65c824a89deb33e70dd0c71f6725b6fbde98b21c192857caff4a

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