[ANN] odr 0.5 -- Orthogonal Distance Regression

Robert Kern kern at myrddin.caltech.edu
Thu Apr 5 00:14:06 EDT 2001


[apologies if this ends up being a duplicate; sending only to c.l.py this time]

odr 0.5 -- Orthogonal Distance Regression (ODR) over NumPy arrays.

The odr package wraps the FORTRAN-77 library ODRPACK which is a 
library for performing a large variety of least-squares regressions
with an efficient trust-region algorithm. 

>From the ODRPACK User's Guide:

"""\
    ODRPACK is a portable collection of ANSI '77 Fortran subroutines for
    fitting a model to data.  It is designed primarily for instances
    when the independent as well as the dependent 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.
 
    ODRPACK is designed to accommodate many levels of user sophistication
    and problem difficulty.
 
    * It is easy to use, providing two levels of user-control of the
      computations, extensive error handling facilities, comprehensive
      printed reports and no size restrictions other than effective
      machine size.

    * The necessary derivatives (Jacobian matrices) are approximated
      numerically if they are not supplied by the user.
 
    * The correctness of user-supplied derivatives can be verified by
      the derivative checking procedure provided.
 
    * Both weighted and unweighted analysis can be performed.
 
    * Subsets of the unknowns can be treated as constants with their
      values held fixed at their input values, allowing the user to
      examine the results obtained by estimating subsets of the
      unknowns of a general model without rewriting the model
      subroutine.
 
    * The ODRPACK scaling algorithm automatically accommodates poorly
      scaled problems, in which the model parameters and/or unknown
      errors in the independent variables vary widely in magnitude.
 
    * The trust region Levenberg-Marquardt algorithm implemented by
      ODRPACK has a computational effort per step which is of the same
      order as that required for ordinary least squares, even though the
      number of unknowns estimated in the orthogonal distance regression
      problem is the number of unknown model parameters plus the number
      of independent variables, while the number of unknowns estimated
      in the ordinary least squares problem is simply the number of
      unknown model parameters.
""" 

All of ODRPACK's features have been exposed in odr's Python two interfaces.
The low-level interface is a single function with many keyword arguments. The
high-level interface uses a set of classes to organize the options and data
effectively.

One can get more information about ODRPACK from the following URLs:

  http://www.netlib.org/odrpack/index.html
  http://www.boulder.nist.gov/mcsd/Staff/JRogers/odrpack.html

One can get the source tarball and Win32 binaries for Python 2.0 from

  http://starship.python.net/crew/kernr/Projects.html


i-like-curve-fitting-don't-you?-ly y'rs

-- 
Robert Kern
kern at caltech.edu

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter



More information about the Python-list mailing list