Least-squares function approximation

From HandWiki
Short description: Mathematical method

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

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]

[math]\displaystyle{ f(x) \approx f_n (x) = a_1 \phi _1 (x) + a_2 \phi _2(x) + \cdots + a_n \phi _n (x), \ }[/math]

with the set of functions {[math]\displaystyle{ \ \phi _j (x) }[/math]} an orthonormal set over the interval of interest, say [a, b]: see also Fejér's theorem. The coefficients {[math]\displaystyle{ \ a_j }[/math]} are selected to make the magnitude of the difference ||ffn||2 as small as possible. For example, the magnitude, or norm, of a function g (x ) over the interval [a, b] can be defined by:[2]

[math]\displaystyle{ \|g\| = \left(\int_a^b g^*(x)g(x) \, dx \right)^{1/2} }[/math]

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 { [math]\displaystyle{ \phi_j (x)\ }[/math] } satisfy orthonormality relations:[3]

[math]\displaystyle{ \int_a^b \phi _i^* (x)\phi _j (x) \, dx =\delta_{ij}, }[/math]

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

[math]\displaystyle{ \|f_n\|^2 = |a_1|^2 + |a_2|^2 + \cdots + |a_n|^2. \, }[/math]

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

[math]\displaystyle{ a_j = \int_a^b \phi _j^* (x)f (x) \, dx. }[/math]

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 [math]\displaystyle{ f }[/math] on [math]\displaystyle{ [a,b] }[/math] and a function [math]\displaystyle{ g\in W }[/math] where [math]\displaystyle{ W }[/math] is a subspace of [math]\displaystyle{ C[a,b] }[/math]:

[math]\displaystyle{ \text{Area} = \int_a^b \left\vert f(x) - g(x)\right\vert \, dx, }[/math]

all within the subspace [math]\displaystyle{ W }[/math]. Due to the frequent difficulty of evaluating integrands involving absolute value, one can instead define

[math]\displaystyle{ \int_a^b [ f(x) - g(x) ] ^2\, dx }[/math]

as an adequate criterion for obtaining the least squares approximation, function [math]\displaystyle{ g }[/math], of [math]\displaystyle{ f }[/math] with respect to the inner product space [math]\displaystyle{ W }[/math].

As such, [math]\displaystyle{ \lVert f-g \rVert ^2 }[/math] or, equivalently, [math]\displaystyle{ \lVert f-g \rVert }[/math], can thus be written in vector form:

[math]\displaystyle{ \int_a^b [ f(x)-g(x) ]^2\, dx = \left\langle f-g , f-g\right\rangle = \lVert f-g\rVert^2. }[/math]

In other words, the least squares approximation of [math]\displaystyle{ f }[/math] is the function [math]\displaystyle{ g\in \text{ subspace } W }[/math] closest to [math]\displaystyle{ f }[/math] in terms of the inner product [math]\displaystyle{ \left \langle f,g \right \rangle }[/math]. Furthermore, this can be applied with a theorem:

Let [math]\displaystyle{ f }[/math] be continuous on [math]\displaystyle{ [ a,b ] }[/math], and let [math]\displaystyle{ W }[/math] be a finite-dimensional subspace of [math]\displaystyle{ C[a,b] }[/math]. The least squares approximating function of [math]\displaystyle{ f }[/math] with respect to [math]\displaystyle{ W }[/math] is given by
[math]\displaystyle{ g = \left \langle f,\vec w_1 \right \rangle \vec w_1 + \left \langle f,\vec w_2 \right \rangle \vec w_2 + \cdots + \left \langle f,\vec w_n \right \rangle \vec w_n, }[/math]
where [math]\displaystyle{ B = \{\vec w_1 , \vec w_2 , \dots , \vec w_n \} }[/math] is an orthonormal basis for [math]\displaystyle{ W }[/math].

References

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