All Projects → jacobwilliams → NumDiff

jacobwilliams / NumDiff

Licence: other
Modern Fortran Numerical Differentiation Library

Programming Languages

fortran
972 projects

Projects that are alternatives of or similar to NumDiff

dfogn
DFO-GN: Derivative-Free Optimization using Gauss-Newton
Stars: ✭ 20 (-58.33%)
Mutual labels:  optimization, numerical-methods
NM
Numerical Methods (NM) for BE Electrical II Year / II Part, Email: [email protected]
Stars: ✭ 13 (-72.92%)
Mutual labels:  numerical-methods, numerical-differentiation
descent
First-order optimization tools
Stars: ✭ 23 (-52.08%)
Mutual labels:  optimization, numerical-methods
Bfgs Neldermead Trustregion
Python implementation of some numerical (optimization) methods
Stars: ✭ 8 (-83.33%)
Mutual labels:  optimization, numerical-methods
Quant Notes
Quantitative Interview Preparation Guide, updated version here ==>
Stars: ✭ 180 (+275%)
Mutual labels:  optimization, numerical-methods
RcppNumerical
Rcpp Integration for Numerical Computing Libraries
Stars: ✭ 52 (+8.33%)
Mutual labels:  optimization, numerical-methods
derivative
Optimal numerical differentiation of noisy time series data in python.
Stars: ✭ 34 (-29.17%)
Mutual labels:  differentiation, numerical-differentiation
Finite-Difference-Method
A Finite Difference Method Engine in C++
Stars: ✭ 15 (-68.75%)
Mutual labels:  numerical-methods, finite-differences
ultraopt
Distributed Asynchronous Hyperparameter Optimization better than HyperOpt. 比HyperOpt更强的分布式异步超参优化库。
Stars: ✭ 93 (+93.75%)
Mutual labels:  optimization
euler2D-kfvs-Fortran2003
2D solver for Euler equations in quadrilateral grid, using kinetic flux vector splitting scheme, written in OOP F2003
Stars: ✭ 17 (-64.58%)
Mutual labels:  numerical-methods
AbstractOperators.jl
Abstract operators for large scale optimization in Julia
Stars: ✭ 26 (-45.83%)
Mutual labels:  optimization
cplex-example
Solving a TSP with the CPLEX C++ API.
Stars: ✭ 40 (-16.67%)
Mutual labels:  optimization
modest-py
FMI-compliant Model Estimation in Python
Stars: ✭ 40 (-16.67%)
Mutual labels:  optimization
SumOfSquares.jl
Sum of Squares Programming for Julia
Stars: ✭ 96 (+100%)
Mutual labels:  optimization
good lp
Linear Programming for Rust, with an user-friendly API. This crate allows modeling LP problems, and let's you solve them with various solvers.
Stars: ✭ 77 (+60.42%)
Mutual labels:  optimization
fastnumbers
Super-fast and clean conversions to numbers.
Stars: ✭ 85 (+77.08%)
Mutual labels:  optimization
noisyopt
Python library for optimizing noisy functions.
Stars: ✭ 73 (+52.08%)
Mutual labels:  optimization
Bracmat
Programming language for symbolic computation with unusual combination of pattern matching features: Tree patterns, associative patterns and expressions embedded in patterns.
Stars: ✭ 42 (-12.5%)
Mutual labels:  differentiation
autodiff
A .NET library that provides fast, accurate and automatic differentiation (computes derivative / gradient) of mathematical functions.
Stars: ✭ 69 (+43.75%)
Mutual labels:  optimization
studio
GAMS Studio
Stars: ✭ 25 (-47.92%)
Mutual labels:  optimization

NumDiff

Brief description

NumDiff provides a modern Fortran interface for computing the Jacobian (derivative) matrix of m nonlinear functions which depend on n variables. The Jacobian matrix is required for various applications, including numerical optimization. It can also be used to test the accuracy of gradients computed by other means. The library also provides for computing the sparsity of this matrix, and returning the Jacobian in sparse or dense form.

Status

GitHub release Build Status codecov last-commit

This is currently a work in progress. The goal is a comprehensive library that contains a full suite of computationally efficient implementations of algorithms for sparsity determination and numerical differentiation. This code is hosted on GitHub at: https://github.com/jacobwilliams/NumDiff

To Do

  • Computing the nonlinear sparsity pattern
    • Specified by the user
    • Assume all elements true
    • Three random points within variable bounds (have the option to specify separate bounds for this purpose)
  • Various order finite different gradient methods
    • 2-point (backward 1, forward 1)
    • 3-point (backward 2, central, forward 2)
    • 4-point (backward 3, backward 2, forward 2, forward 3)
    • 5-point (backward 4, backward 3, central, forward 3, forward 4)
    • 6-point (backward 5, backward 4, backward 3, forward 3, forward 4, forward 5)
    • 7-point (backward 6, backward 5, backward 4, central, forward 4, forward 5, forward 6)
    • 8-point (backward 7, backward 6, backward 5, backward 4, forward 4, forward 5, forward 6, forward 7)
    • 9-point (backward 8, backward 7, backward 6, backward 5, central, forward 5, forward 6, forward 7, forward 8)
    • 11-point (central)
    • 13-point (central)
    • 15-point (central)
    • 17-point (central)
  • Perturbations should respect variable bounds
  • Neville's process
  • Ability to use different methods for different columns
  • Jacobian partitioning to compute multiple columns at the same time
  • Estimate the optimal perturbation step size
  • Computing the linear sparsity pattern (constant elements of Jacobian)
  • Add other gradient methods?
  • Also compute Hessian matrix?
  • OpenMP or Coarrays for parallelization
  • Testing for computational efficiency
  • General code cleanup

Building NumDiff

FPM

A Fortran Package Manager manifest file is included, so that the library and tests cases can be compiled with FPM. For example:

fpm build --profile release
fpm test --profile release

To use NumDiff within your FPM project, add the following to your fpm.toml file:

[dependencies]
NumDiff = { git="https://github.com/jacobwilliams/NumDiff.git" }

To generate the documentation using FORD, run:

  ford numdiff.md

By default, the library is built with double precision (real64) real values. Explicitly specifying the real kind can be done using the following processor flags:

Preprocessor flag Kind Number of bytes
REAL32 real(kind=real32) 4
REAL64 real(kind=real64) 8
REAL128 real(kind=real128) 16

For example, to build a single precision version of the library, use:

fpm build --profile release --flag "-DREAL32"

Documentation

The latest API documentation can be found here. This was generated from the source code using FORD (note that the included build.sh script will also generate these files).

License

The NumDiff source code and related files and documentation are distributed under a permissive free software license (BSD-style).

References

  • J. Oliver, "An algorithm for numerical differentiation of a function of one real variable", Journal of Computational and Applied Mathematics 6 (2) (1980) 145-160. Fortran 77 code from NIST
  • Thomas F. Coleman, Burton S. Garbow, Jorge J. More, "Algorithm 618: FORTRAN subroutines for estimating sparse Jacobian Matrices", ACM Transactions on Mathematical Software (TOMS), Volume 10 Issue 3, Sept. 1984, Pages 346-347
  • G. E. Mullges, F. Uhlig, "Numerical Algorithms with Fortran", Springer, 1996.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].