Skip to content

Repository files navigation

Global Optimization Benchmark (GLOBe)

CI CI PyPI version Code style: black

GLOBe Logo

GLOBe 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.

Algorithms

Documentation

The documentation is available at gaetanserre.fr/GLOBe.

Installation (Python ≥ 3.10)

Install the package via pip from PyPI:

pip install globe-opti

Alternatively, download the corresponding wheel file from the releases and install it with pip:

pip install globe-opti-<version>-<architecture>.whl

Build from source

Make sure you have CMake (≥ 3.28), a c++ compiler, and the eigen3 library installed. Then clone the repository and run:

pip install . -v

It should build the C++ extensions and install the package. You can also build the documentation with:

cd docs
pip install -r requirements.txt
make html

Usage

This 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_globe.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 globe.optimizers import AdaLIPO_P
from globe import create_bounds

f = lambda x: 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.

Contributing

Contributions are welcome! Please see the CONTRIBUTING file for guidelines.

References

License

This is licensed under the GNU General Public License v3.0. See the LICENSE file for details.

About

GOB is a collection of global optimization algorithms implemented in C++ and linked with Python.

Resources

Contributing

Stars

4 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages