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

Uploaded Source

Built Distributions

egobox-0.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.10 Windows x86-64

egobox-0.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

egobox-0.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

egobox-0.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.7 Windows x86-64

egobox-0.10.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB view details)

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

File details

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

File metadata

  • Download URL: egobox-0.10.0.tar.gz
  • Upload date:
  • Size: 777.0 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.0.tar.gz
Algorithm Hash digest
SHA256 48f3590a9e59b275314bcd94a930d99083346321d982e68a2806598f112e7ee1
MD5 07962113a34f24e82fa4b140fdd376f0
BLAKE2b-256 0076c0e2f4265a4ad19594b8e5939a7c6731f5bdc88920720df118c4a4936dbd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for egobox-0.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 818e61a441001ceea4a9bb8b2208337e8579281f7b3ce03a8c1c807ee871bbce
MD5 5225a10e4c4db7636ca83040f50f5729
BLAKE2b-256 e033c0b7027631fc7b5998481f5f87d9cc55afd91982d22118549b90a23211aa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: egobox-0.10.0-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.10.0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 b9b8e49754e577fd9aefcc64a36d333ab81720346d365056c33222605eabb1f0
MD5 538cffb5e6ce45a9efac7b546aa666f7
BLAKE2b-256 161b552cad08fed131e22e5f0c88d7cf28456638470d0b379c7877fc17d0d7da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for egobox-0.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dd41b22ceebe8fe5d2611e13ab8a8b70e7ad1b294d5780f797af04d3e1d0fce8
MD5 939dd4975bef0c23ff1d0de509492f6f
BLAKE2b-256 b8b04d879d4f0a8974f4b64f1a8ddfca2d547637f715ccd198b6a7c3debe13cb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: egobox-0.10.0-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.10.0-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 ce355a4374356fab1682eaed70e36858f30a52d4f37eb080c9e9b93ba3a72550
MD5 f52ac47ded7589dc2397e07354a24554
BLAKE2b-256 9a653e59388521bf7549862a2494c9a6d435e6acb8456ba01814ef641fcab94a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for egobox-0.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9d9263bcb1f3e746627582d0a1a0635ed19be329ac1722f65c6d9f23c3af6bb1
MD5 3e8e25e570a9758b88efa57ada03d810
BLAKE2b-256 6d37422ac996f0127c91145d542b7d1f20ea1369cb828a2ac51995d3d6ac4486

See more details on using hashes here.

File details

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

File metadata

  • Download URL: egobox-0.10.0-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.10.0-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 8bbe96dc83cf0fd21313992db83736396503299610655164de8d9cecc9d8ab43
MD5 b9476d72379a7a108fbd51753331fba4
BLAKE2b-256 2ad4ce5725907f5fe7d6aaaf9dd5e6149f66d00def343be050863c38e70fa4af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for egobox-0.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ec3d67fb340b7a4227e09011af12052c40cd74b0af635c454db5beec0f16b4fb
MD5 65a8b16e0fa6bd4ba69a9b7ef63610f9
BLAKE2b-256 9f353710f20921e268c28565d6488b0a01b7db4cc7e9dd6f00e467c41f64f011

See more details on using hashes here.

File details

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

File metadata

  • Download URL: egobox-0.10.0-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.10.0-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 3e90206e9c5923323bc5fea024a85d5049a04e73951149050867f3697a8103a4
MD5 27eb01891498ec8630e2a1b1297b3ea6
BLAKE2b-256 68efb7beb69cf349cfe1df9a1f29f217d46fc742a930cde647d95dd4a204a179

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for egobox-0.10.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1be8913dd919b3c6530619e4a6e18307d6f5ff91342defae43d75fe04ab4f3f0
MD5 f453ca53415e726bb172b7051b3cb800
BLAKE2b-256 b3b31e9290f528077bb835ebfb2abeb45e031d832246d7db1ba732965e7e233a

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