Presentation is loading. Please wait.

Presentation is loading. Please wait.

The topic: Least squares method Numeriska beräkningar i Naturvetenskap och Teknik.

Similar presentations


Presentation on theme: "The topic: Least squares method Numeriska beräkningar i Naturvetenskap och Teknik."— Presentation transcript:

1 The topic: Least squares method Numeriska beräkningar i Naturvetenskap och Teknik

2 An exemple Model Why do the measured values deviate from the model if the measurement is correct? Numeriska beräkningar i Naturvetenskap och Teknik

3 How determine the ‘best’ straight line? Model Numeriska beräkningar i Naturvetenskap och Teknik

4 Distance between line and measurements points... Numeriska beräkningar i Naturvetenskap och Teknik

5 How to define the distance between the line and the measurement points? Largest deviation at minimum Approximation in maximum norm Sum of deviations squared as small as possible Approximation in Euclidian norm Easier to calculate! Norm Numeriska beräkningar i Naturvetenskap och Teknik

6 Matrix formulation: An example with More equations than unknowns! Numeriska beräkningar i Naturvetenskap och Teknik

7 Matrix formulation: An example Numeriska beräkningar i Naturvetenskap och Teknik

8 Matrix formulation: An example Numeriska beräkningar i Naturvetenskap och Teknik

9 Matrix formulation: An example Numeriska beräkningar i Naturvetenskap och Teknik

10 General Statement of the Problem: Depending on the model, the measurement data can of course be described by other expressions than the straight line. In general terms one seeks a function f* that approximates f’s given values as well as possible in euclidian norm. Specifically, above we looked for a solution expressed as but we could as well have looked for a solution given by another function (possibly then for different data) etc... Numeriska beräkningar i Naturvetenskap och Teknik

11 Generally one can thus write: f(x) is in other words a linear combination of given functions Where the coefficients are sought One can in accordande with a vector space look at it so that Spans a function space (a space of this kind which fulfills certain conditions is called a Hilbert space, cmp. quant. mech) Numeriska beräkningar i Naturvetenskap och Teknik

12 In the case of the straight line we have In a geometrical comparision these two functions, which can be seen as two vectors in the function space, span a plane U: ”vector” 0 ”vector” 1 Approximating function sought function The smallest distance from the plane is given by a normal. The Smallest deviation between f* och f is for f*-f orthogonal to the plane U! Numeriska beräkningar i Naturvetenskap och Teknik

13 Normal equations Since we are interested in fitting m measured values we leave the picture of the continuous function space and view f(x) as an m-dimensional vector with values: That should be expressed byand For the straight line: Numeriska beräkningar i Naturvetenskap och Teknik

14 The orthogonality condition now gives the equations: where the equations for the normal: Which gives Numeriska beräkningar i Naturvetenskap och Teknik

15 The equations for the normal : Numeriska beräkningar i Naturvetenskap och Teknik

16 Back to the exemple: Model: Data: Numeriska beräkningar i Naturvetenskap och Teknik

17 Conclusion: the minimum of is orthogonal to the basis vectors Assuming the modelGiven data is obtained when The coefficienterna c 1, c 2, c 3, c n are determined from Numeriska beräkningar i Naturvetenskap och Teknik

18 The equations or Where the colomuns in A are: Numeriska beräkningar i Naturvetenskap och Teknik

19 Note 1: The func’s Have to be linearly independent (cmp vectors in a vector space) Note 2: Assume our problem would have been (x koord -996) cmp to Numeriska beräkningar i Naturvetenskap och Teknik


Download ppt "The topic: Least squares method Numeriska beräkningar i Naturvetenskap och Teknik."

Similar presentations


Ads by Google