Least-squares function approximation explained

In mathematics, least squares function approximation applies the principle of least squares to function approximation, by means of a weighted sum of other functions. The best approximation can be defined as that which minimizes the difference between the original function and the approximation; for a least-squares approach the quality of the approximation is measured in terms of the squared differences between the two.

Functional analysis

See also: Fourier series and Generalized Fourier series.

A generalization to approximation of a data set is the approximation of a function by a sum of other functions, usually an orthogonal set:[1]

f(x)fn(x)=a1\phi1(x)+a2\phi2(x)++an\phin(x),

with the set of functions an orthonormal set over the interval of interest, : see also Fejér's theorem. The coefficients are selected to make the magnitude of the difference ||||2 as small as possible. For example, the magnitude, or norm, of a function over the can be defined by:[2]

\|g\|=

b
\left(\int
a

g*(x)g(x)dx\right)1/2

where the ‘*’ denotes complex conjugate in the case of complex functions. The extension of Pythagoras' theorem in this manner leads to function spaces and the notion of Lebesgue measure, an idea of “space” more general than the original basis of Euclidean geometry. The satisfy orthonormality relations:[3]

b
\int
a

\phi

*
i

(x)\phij(x)dx=\deltaij,

where δij is the Kronecker delta. Substituting function into these equations then leads tothe n-dimensional Pythagorean theorem:[4]

2
\|f
n\|

=

2
|a
1|

+

2
|a
2|

++

2.
|a
n|

The coefficients making ||ffn||2 as small as possible are found to be:[1]

aj=

b
\int
a

\phi

*
j

(x)f(x)dx.

The generalization of the n-dimensional Pythagorean theorem to infinite-dimensional  real inner product spaces is known as Parseval's identity or Parseval's equation.[5] Particular examples of such a representation of a function are the Fourier series and the generalized Fourier series.

Further discussion

Using linear algebra

It follows that one can find a "best" approximation of another function by minimizing the area between two functions, a continuous function

f

on

[a,b]

and a function

g\inW

where

W

is a subspace of

C[a,b]

:

Area=

b
\int
a

\left\vertf(x)-g(x)\right\vertdx,

all within the subspace

W

. Due to the frequent difficulty of evaluating integrands involving absolute value, one can instead define
b
\int
a

[f(x)-g(x)]2dx

as an adequate criterion for obtaining the least squares approximation, function

g

, of

f

with respect to the inner product space

W

.

As such,

\lVertf-g\rVert2

or, equivalently,

\lVertf-g\rVert

, can thus be written in vector form:
b
\int
a

[f(x)-g(x)]2dx=\left\langlef-g,f-g\right\rangle=\lVertf-g\rVert2.

In other words, the least squares approximation of

f

is the function

g\insubspaceW

closest to

f

in terms of the inner product

\left\langlef,g\right\rangle

. Furthermore, this can be applied with a theorem:

Let

f

be continuous on

[a,b]

, and let

W

be a finite-dimensional subspace of

C[a,b]

. The least squares approximating function of

f

with respect to

W

is given by

g=\left\langlef,\vecw1\right\rangle\vecw1+\left\langlef,\vecw2\right\rangle\vecw2++\left\langlef,\vecwn\right\rangle\vecwn,

where

B=\{\vecw1,\vecw2,...,\vecwn\}

is an orthonormal basis for

W

.

Notes and References

  1. Book: Applied analysis . Cornelius Lanczos . 212–213 . 0-486-65656-X . Dover Publications . 1988 . Reprint of 1956 Prentice–Hall .
  2. Book: Fourier analysis and its application . 69 . Equation 3.14 . Gerald B Folland . https://books.google.com/books?id=ix2iCQ-o9x4C&pg=PA69 . 978-0-8218-4790-9 . American Mathematical Society Bookstore . 2009 . Reprint of Wadsworth and Brooks/Cole 1992.
  3. Book: Fourier Analysis and Its Applications. 69 . Gerald B . Folland. 978-0-8218-4790-9 . 2009 . American Mathematical Society.
  4. Book: Statistical methods: the geometric approach . David J. Saville, Graham R. Wood . §2.5 Sum of squares . 30 . https://books.google.com/books?id=8ummgMVRev0C&pg=PA30 . 0-387-97517-9 . 1991 . 3rd . Springer.
  5. Book: cited work . 77 . Equation 3.22 . Gerald B Folland . https://books.google.com/books?id=ix2iCQ-o9x4C&pg=PA77 . 978-0-8218-4790-9 . 2009-01-13 . American Mathematical Soc. .