Skip to content

Framework and implementation for mathematical optimization and solving non-linear systems of equations.

License

Notifications You must be signed in to change notification settings

datamole-ai/gomez

Repository files navigation

gomez

Build License Cargo Documentation

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.

About

Framework and implementation for mathematical optimization and solving non-linear systems of equations.

Topics

Resources

License

Stars

Watchers

Forks

Languages