45 releases

0.10.0 Feb 27, 2024
0.8.1 Feb 20, 2023
0.7.0 Aug 28, 2022
0.6.0-rc.2 Jul 31, 2022
0.0.10 Feb 12, 2018

#25 in Math

Download history 5956/week @ 2024-08-04 5679/week @ 2024-08-11 5742/week @ 2024-08-18 6790/week @ 2024-08-25 7396/week @ 2024-09-01 6341/week @ 2024-09-08 5535/week @ 2024-09-15 7183/week @ 2024-09-22 6226/week @ 2024-09-29 5030/week @ 2024-10-06 6312/week @ 2024-10-13 6143/week @ 2024-10-20 3952/week @ 2024-10-27 4508/week @ 2024-11-03 4185/week @ 2024-11-10 4163/week @ 2024-11-17

16,960 downloads per month
Used in 53 crates (35 directly)

MIT/Apache

1MB
22K SLoC

Mathematical optimization in pure Rust

Website | Book | Docs (latest release) | Docs (main branch) | Examples (latest release) | Examples (main branch)

Crates.io version Crates.io downloads GitHub Actions workflow status License argmin Discord

argmin is a numerical optimization library written entirely in Rust.

argmins goal is to offer a wide range of optimization algorithms with a consistent interface. It is type-agnostic by design, meaning that any type and/or math backend, such as nalgebra or ndarray can be used -- even your own.

Observers allow one to track the progress of iterations, either by using one of the provided ones for logging to screen or disk or by implementing your own.

An optional checkpointing mechanism helps to mitigate the negative effects of crashes in unstable computing environments.

Due to Rusts powerful generics and traits, most features can be exchanged by your own tailored implementations.

argmin is designed to simplify the implementation of optimization algorithms and as such can also be used as a toolbox for the development of new algorithms. One can focus on the algorithm itself, while the handling of termination, parameter vectors, populations, gradients, Jacobians and Hessians is taken care of by the library.

Algorithms

  • Line searches
    • Backtracking line search
    • More-Thuente line search
    • Hager-Zhang line search
  • Trust region method
    • Cauchy point method
    • Dogleg method
    • Steihaug method
  • Steepest descent
  • Conjugate gradient method
  • Nonlinear conjugate gradient method
  • Newton methods
    • Newton’s method
    • Newton-CG
  • Quasi-Newton methods
    • BFGS
    • L-BFGS
    • DFP
    • SR1
    • SR1-TrustRegion
  • Gauss-Newton method
  • Gauss-Newton method with linesearch
  • Golden-section search
  • Landweber iteration
  • Brent’s method
  • Nelder-Mead method
  • Simulated Annealing
  • Particle Swarm Optimization

External solvers compatible with argmin

External solvers which implement the Solver trait are compatible with argmins Executor, and as such can leverage features like checkpointing and observers.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~1–10MB
~107K SLoC