9 unstable releases (4 breaking)
0.5.0 | Nov 22, 2023 |
---|---|
0.4.1 | May 15, 2023 |
0.3.2 | Apr 28, 2023 |
0.3.1 | May 8, 2022 |
0.1.0 | Dec 20, 2021 |
#986 in Math
99 downloads per month
175KB
3.5K
SLoC
gomez
gomez is a framework and implementation for mathematical optimization and solving non-linear systems of equations.
The library is written completely in Rust. Its focus is on being useful for practical problems and having API that is simple for easy cases as well as flexible for complicated ones. The name stands for global optimization & non-linear equations solving, with a few typos.
Practical problems
The main goal is to be useful for practical problems. This is manifested by the following features:
- Derivative-free. No algorithm requires an analytical derivative (gradient, Hessian, Jacobian). Methods that use derivatives approximate it using finite difference method1.
- Constraints support. It is possible to specify the problem domain with constraints2, which is necessary for many engineering applications.
- Non-naive implementations. The code is not a direct translation of a textbook pseudocode. It's written with performance in mind and applies important techniques from numerical mathematics. It also tries to handle situations that hurt the methods but occur in practice.
1 There is a plan to provide ways to override this approximation with a real derivative.
2 Currently, only unconstrained and box-bounded domains are supported.
Algorithms
- Trust region – Recommended method to be used as a default and it will just work in most cases.
- LIPO – Global optimization algorithm useful for searching good initial guesses in combination with a numerical algorithm.
- Steffensen – Fast and lightweight method for solving one-dimensional systems of equations.
- Nelder-Mead – Direct search optimization method that does not use any derivatives.
This list will be extended in the future. But at the same time, having as many algorithms as possible is not the goal. Instead, the focus is on providing quality implementations of battle-tested methods.
Roadmap
Listed not in priority order.
- Homotopy continuation method to compare the performance with the trust region method
- Conjugate gradient method
- Experimentation with various global optimization techniques for initial guess
search
- Evolutionary/nature-inspired algorithms
- Bayesian optimization
- Focus on initial guesses search and tools for analysis in general
License
Licensed under MIT.
There are gsl-wrapper
and gsl-sys
crates which are licensed under the
GPLv3 identically as
GSL itself. This code is part of the
repository but is not part of the gomez library. Its purpose is solely for
comparison in the benchmarks.
Dependencies
~3.5MB
~77K SLoC