GOB is a collection of global optimization algorithms implemented in C++ and linked with Python. It also includes a set of analytical benchmark functions and a random function generator (PyGKLS) to test the performance of these algorithms.
- AdaLIPO+
- AdaRankOpt
- Bayesian Optimization
- CMA-ES
- Controlled Random Search
- DIRECT
- Every Call is Precious
- Multi-Level Single-Linkage
- Social Only Particle Swarm Optimization
- Langevin dynamics
- Stein Boltzmann Sampling
- Consensus Based Optimization
- Common noise variants of McKean-Vlasov dynamics
- Gradient Descent
- Multi-start Gradient Descent
- Pure Random Search
The documentation is available at gaetanserre.fr/GOB.
Install the package via pip from PyPI:
pip install gobAlternatively, download the corresponding wheel file from the releases and install it with pip:
pip install gob-<version>-<architecture>.whlMake sure you have CMake (≥ 3.28), a c++ compiler, and the eigen3 library installed. Then clone the repository and run:
pip install . -vIt should build the C++ extensions and install the package. You can also build the documentation with:
cd docs
pip install -r requirements.txt
make htmlThis package can be used to design a complete benchmarking framework for global optimization algorithms, testing multiple algorithms on a set of benchmark functions. See test_gob.py for an example of how to use it.
The global optimization algorithms can also be used independently. For example, to run the AdaLIPO+ algorithm on a benchmark function:
from gob.optimizers import AdaLIPO_P
from gob import create_bounds
f = lambda x: return x.T @ x
opt = AdaLIPO_P(create_bounds(2, -5, 5), 300)
res = opt.minimize(f)
print(f"Optimal point: {res[0]}, Optimal value: {res[1]}")See test_optimizers.py for more examples of how to use the algorithms.
Contributions are welcome! Please see the CONTRIBUTING file for guidelines.
This project is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0). See the LICENSE file for details.
