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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.11 Windows x86-64

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

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.7 Windows x86-64

egobox-0.10.1.post0-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.post0-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.post0-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.post0-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

File details

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

File metadata

  • Download URL: egobox-0.10.1_post0.tar.gz
  • Upload date:
  • Size: 772.4 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_post0.tar.gz
Algorithm Hash digest
SHA256 871dfbfe7105e9967901f942b5236d5082fc818caf11696de7916bc589360661
MD5 00ce4af6863bdb67102c6bfcccdf933e
BLAKE2b-256 6666f628c744b45b3cf27fbf60bea5684af3a429a213afaaac75a556f06628e1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: egobox-0.10.1_post0-cp311-none-win_amd64.whl
  • Upload date:
  • Size: 2.9 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_post0-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 f4d9a6f229628fd8a064cbdf16e64fbb0fcd1f007ad451cf26ea72f530d41fbc
MD5 699a3c1c52cc9205c1c8f3a9216adad0
BLAKE2b-256 3d4e43f28c0d7186b88bdca7cd32026525d5f758df6d94cf01a35315a165c2b1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: egobox-0.10.1_post0-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 2.9 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_post0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 4cc27dcec9229d5c7a2f1feffb4cf1fcfc92ecfca16d3d5dba6bd4956d08a86c
MD5 c4bb1e082b16dc90a65bdb6f1064a54a
BLAKE2b-256 aad69355ace70941fbd51b557238c774c7279f23d657ecbff019cdb02b6a8a0f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: egobox-0.10.1_post0-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 2.9 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_post0-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 537fab6639b9bc38611c5859adfb526d48f76f6a77c3ceeb960f2faf4c2c1e5b
MD5 53e2da7f1cd683e792f97efe43d4672f
BLAKE2b-256 c985792fe1c1ccfd8e580cff3df34fdb33e915a3033b17317d264abcb3d29fb8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: egobox-0.10.1_post0-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 2.9 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_post0-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 3a488eee4f32e3dadb07d4feeb48982b93d7f839e4491c6ad62f936328d03d5c
MD5 2b500056af3907dcb4282a6ef7ce40de
BLAKE2b-256 605d809f7928f2b75828d3ce051411cc1448b4a587e644e0c15229cd791686ff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: egobox-0.10.1_post0-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 2.9 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_post0-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 0b2076728ed4059162d2eaa44376d771096fcd8c69d9225891bf6abc88c9e3c8
MD5 8cd4b872fe3509a526f84aa42dd3ec59
BLAKE2b-256 17194fef5fa3bf764b9088e5684874473a85553b328d4d86184e6118e58079b7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for egobox-0.10.1.post0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 905580a1c44d4382ea05e19365310ed6b4051fcf114bb25781ea498ff8a4f928
MD5 244c259f358956d52ca41fcdb253867b
BLAKE2b-256 8f4b6d1c7e7fe2cb0bde1529009db2992c43f005b4f993b2c4868823cf66e40e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for egobox-0.10.1.post0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1a4be60c8c3cbec498edccf604c16f6d4e50f037aa8e2bdb8527386b61066633
MD5 1e3090c64695878230d96854e0a50b8a
BLAKE2b-256 0c91b677088a5a7fadd3849216e9612cb3d2c1fb0253003b1b56312025596610

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for egobox-0.10.1.post0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e20c90ed4bf55c6cd4fa2e8bd5d0ea3d43009da3b2aab33e3c35c3039b3e47b4
MD5 22dd3b8998ab7ae73c568539c21989e9
BLAKE2b-256 ffa91ad32e8c64c4b986d958d3d8d81553d1ad8b27380e90ba98e0951125a7b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for egobox-0.10.1.post0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 165247d4ab434fe27824fd1e285ef1188715225cdb6335a95de4512322cfc2df
MD5 862ceca6a14522bb6f28c00cc2e1ebb9
BLAKE2b-256 b61e6d462a07b4f17d421003df0f5a8bb0153183eb7fe3ae4fdfd26944aa89fb

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