15 - Least-squares line Polynomial least-squares General...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Least-squares line Polynomial least-squares General linear models General Linear Least-Squares Dhavide Aruliah UOIT MATH 2070U c D. Aruliah (UOIT) General Linear Least-Squares MATH 2070U 1 / 34 Least-squares line Polynomial least-squares General linear models General Linear Least-Squares 1 Least-squares fitting with straight line (least-squares line) 2 Least-squares fitting with polynomials (polynomial least-squares) 3 Least-squares fitting of general linear models c D. Aruliah (UOIT) General Linear Least-Squares MATH 2070U 2 / 34 Least-squares line Polynomial least-squares General linear models Data approximation problem Data approximation problem Given n data points { ( x 1 , y 1 ) , ( x 2 , y 2 ) , . . . , ( x n , y n ) } , determine a function e f that approximates the data, i.e., e f ( x k ) y k ( k = 1: n ) .-5-4-3-2-1 1 2 3 4 5-3-2-1 1 2 3 c D. Aruliah (UOIT) General Linear Least-Squares MATH 2070U 4 / 34 Least-squares line Polynomial least-squares General linear models Least-squares fit with straight line (cont.) 1 2 3 4 5 6 7 8 9 10-2-1 1 2 3 4 5 Least squares line fit c D. Aruliah (UOIT) General Linear Least-Squares MATH 2070U 5 / 34 Least-squares line Polynomial least-squares General linear models Least-squares fit with straight line Let e f ( x ) = a + a 1 x Given { ( x k , y k ) } n k = 1 , exact interpolation conditions are a + a 1 x k = y k ( k = 1: n ) Write system of equations to fit in matrix form 1 a + x 1 a 1 = y 1 1 a + x 2 a 1 = y 2 . . . 1 a + x n a 1 = y n 1 x 1 1 x 2 1 x 3 . . . . . . 1 x n | {z } [ V ] a a 1 | {z } { a } = y 1 y 2 y 3 . . . y n | {z } { y } [ V ] R n 2 { a } R 2 1 { y } R n 1 Overdetermined system to approximate solution is [ V ] { a } = { y } c D. Aruliah (UOIT) General Linear Least-Squares MATH 2070U 6 / 34 Least-squares line Polynomial least-squares General linear models Normal equations for least-squares line From before, normal equations are n k = 1 [ a + a 1 x k- y k ] = n k = 1 a x k + a 1 x 2 k- y k x k = Normal equations in matrix form: [ V ] T [ V ] { a } = [ V ] T { y } In practice, least-squares approximation found directly from [ V ] { a } = { y } c D. Aruliah (UOIT) General Linear Least-Squares MATH 2070U 7 / 34 Least-squares line Polynomial least-squares General linear models Solution of the normal equations For overdetermined linear system of equations [ V ] { a } = { y } , normal equations [ V ] T [ V ] { a } = [ V ] T { y } solved directly using backslash in MATLAB c D. Aruliah (UOIT) General Linear Least-Squares MATH 2070U 8 / 34 Least-squares line Polynomial least-squares General linear models Example: biomechanical data k k e k k k e k 1 0.00 0.00 5 0.31 0.23 2 0.06 0.08 6 0.47 0.25 3 0.14 0.14 7 0.60 0.28 4 0.25 0.20 8 0.70 0.29 c.f., Problem 3.3, Figure 3.16 in Quarteroni & Saleric....
View Full Document

Page1 / 30

15 - Least-squares line Polynomial least-squares General...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online