Skip to content

Software for Weighted Orthogonal Distance Regression with Bound Constraints

License

Notifications You must be signed in to change notification settings

HugoMVale/odrpack95

Repository files navigation

odrpack95

CI codecov Language

Description

ODRPACK95 is a portable collection of Fortran 95 subprograms for fitting a model to data with bound constraints on the model parameters. It is designed primarily for instances when the explanatory as well as the response variables have significant errors, implementing a highly efficient algorithm for solving the weighted orthogonal distance regression problem, i.e., for minimizing the sum of the squares of the weighted orthogonal distances between each data point and the curve described by the model equation. It can also be used to solve the ordinary least squares problem where all of the errors are attributed to the observations of the dependent variable.

This project aims to modernize the original code, namely:

  • Modify the tests so they can be automatically run in the CI.
  • Conversion from fixed (.f) to free-form (.f90) source.
  • Fix warnings, etc.
  • Implement a C API.
  • Implement python bindings to the C API.

Build instructions

With fpm

The easiest way to build/test the code and run the examples is by means of fpm.

To build the library, do:

fpm build --profile release

To run the tests, do:

fpm test --profile release

To run the provided example, do:

fpm run --example "example_name" --profile release

With meson

First, setup the build:

meson setup _build

To build the libraries (static and dynamic), do:

meson compile -C _build

To run the tests, do:

meson test -C _build

Licence

  • The original ODERPACK95 code is public domain.
  • Any modications done in the course of this project are covered by BSD-3.

References

  • Original code from Netlib.
  • Paul T. Boggs, Janet R. Donaldson, Richaard h. Byrd, and Robert B. Schnabel. 1989. Algorithm 676: ODRPACK: software for weighted orthogonal distance regression. ACM Trans. Math. Softw. 15, 4 (Dec. 1989), 348–364. https://doi.org/10.1145/76909.76913
  • Jason W. Zwolak, Paul T. Boggs, and Layne T. Watson. 2007. Algorithm 869: ODRPACK95: A weighted orthogonal distance regression code with bound constraints. ACM Trans. Math. Softw. 33, 4 (August 2007), 27–es. https://doi.org/10.1145/1268776.1268782