Algorithm 742: L2CXFT: a Fortran subroutine for least-squares data fitting with nonnegative second divided differences

  • Authors:
  • I. C. Demetriou

  • Affiliations:
  • Univ. of Athens, Athens, Greece

  • Venue:
  • ACM Transactions on Mathematical Software (TOMS)
  • Year:
  • 1995

Quantified Score

Hi-index 0.00

Visualization

Abstract

A Fortran subroutine applies the method of Demetriou and Powell [1991] to restore convexity in n measurements of a convex function contaminated by random errors. The method minimizes the sum of the squares of the errors, subject to nonnegativity of second divided differences, in two phases. First, an approximation close to the optimum is derived in O(n) operations. Then, this approximation is used as the starting point of a dual-feasible quadratic programming algorithm that completes the calculation of the optimum. The constraints allow B-splines to be used, which reduce the problem to an equivalent one with fewer variables where the knots of the splines are determined automatically from the data points due to the constraint equations. The subroutine benefits from this reduction, since common submatrices that occur during the calculation are updated suitably. Iterative refinement improves the accuracy of some calculations when round-off errors accumulate. The subroutine has been applied to a variety of data having substantial differences and has performed fast and stably even for small data spacing, large n, and single-precision arithmetic. Driver programs and examples with output are provided to demonstrate the use of the subroutine.