CISE 301: Numerical Methods Lecture 5, Topic 4 Least Squares, Curve Fitting

Similar documents
Numerical Analysis Topic 4: Least Squares Curve Fitting

Least squares. Václav Hlaváč. Czech Technical University in Prague

DCDM BUSINESS SCHOOL NUMERICAL METHODS (COS 233-8) Solutions to Assignment 3. x f(x)

6 Roots of Equations: Open Methods

Chapter Newton-Raphson Method of Solving a Nonlinear Equation

Fall 2012 Analysis of Experimental Measurements B. Eisenstein/rev. S. Errede. with respect to λ. 1. χ λ χ λ ( ) λ, and thus:

Chapter 5 Supplemental Text Material R S T. ij i j ij ijk

Abhilasha Classes Class- XII Date: SOLUTION (Chap - 9,10,12) MM 50 Mob no

Chapter Newton-Raphson Method of Solving a Nonlinear Equation

ME 501A Seminar in Engineering Analysis Page 1

Linear Regression & Least Squares!

UNIVERSITY OF IOANNINA DEPARTMENT OF ECONOMICS. M.Sc. in Economics MICROECONOMIC THEORY I. Problem Set II

Principle Component Analysis

INTERPOLATION(1) ELM1222 Numerical Analysis. ELM1222 Numerical Analysis Dr Muharrem Mercimek

International Journal of Pure and Applied Sciences and Technology

x yi In chapter 14, we want to perform inference (i.e. calculate confidence intervals and perform tests of significance) in this setting.

8. INVERSE Z-TRANSFORM

Lecture 36. Finite Element Methods

Course Review Introduction to Computer Methods

Shuai Dong. Using Math and Science to improve your game

Quiz: Experimental Physics Lab-I

Model Fitting and Robust Regression Methods

Rank One Update And the Google Matrix by Al Bernstein Signal Science, LLC

7.2 Volume. A cross section is the shape we get when cutting straight through an object.

Lecture 4: Piecewise Cubic Interpolation

The Schur-Cohn Algorithm

Effects of polarization on the reflected wave

Multiple view geometry

Department of Mechanical Engineering, University of Bath. Mathematics ME Problem sheet 11 Least Squares Fitting of data

ORDINARY DIFFERENTIAL EQUATIONS

Polynomial Regression Models

Numerical Methods. ME Mechanical Lab I. Mechanical Engineering ME Lab I

ESCI 342 Atmospheric Dynamics I Lesson 1 Vectors and Vector Calculus

Fundamental Theorem of Calculus

Definition of Tracking

Lecture 16 Statistical Analysis in Biomaterials Research (Part II)

SVMs for regression Non-parametric/instance based classification method

Regression. The Simple Linear Regression Model

Correlation and Regression. Correlation 9.1. Correlation. Chapter 9

4. Eccentric axial loading, cross-section core

Linear and Nonlinear Optimization

VECTORS VECTORS VECTORS VECTORS. 2. Vector Representation. 1. Definition. 3. Types of Vectors. 5. Vector Operations I. 4. Equal and Opposite Vectors

Chapter Runge-Kutta 2nd Order Method for Ordinary Differential Equations

n α j x j = 0 j=1 has a nontrivial solution. Here A is the n k matrix whose jth column is the vector for all t j=0

Pyramid Algorithms for Barycentric Rational Interpolation

( ) [ ( k) ( k) ( x) ( ) ( ) ( ) [ ] ξ [ ] [ ] [ ] ( )( ) i ( ) ( )( ) 2! ( ) = ( ) 3 Interpolation. Polynomial Approximation.

Trigonometry. Trigonometry. Solutions. Curriculum Ready ACMMG: 223, 224, 245.

COMPLEX NUMBER & QUADRATIC EQUATION

INTRODUCTORY NUMERICAL ANALYSIS

STAT 3340 Assignment 1 solutions. 1. Find the equation of the line which passes through the points (1,1) and (4,5).

LINEAR ALGEBRA APPLIED

where I = (n x n) diagonal identity matrix with diagonal elements = 1 and off-diagonal elements = 0; and σ 2 e = variance of (Y X).

Lecture Notes on Linear Regression

Introduction to Regression

Linear Feature Engineering 11

e i is a random error

Applied Statistics Qualifier Examination

LOCAL FRACTIONAL LAPLACE SERIES EXPANSION METHOD FOR DIFFUSION EQUATION ARISING IN FRACTAL HEAT TRANSFER

Machine Learning Support Vector Machines SVM

Variable time amplitude amplification and quantum algorithms for linear algebra. Andris Ambainis University of Latvia

Fitting a Polynomial to Heat Capacity as a Function of Temperature for Ag. Mathematical Background Document

GAUSS ELIMINATION. Consider the following system of algebraic linear equations

CENTROID (AĞIRLIK MERKEZİ )

Work and Energy (Work Done by a Varying Force)

Introduction to Numerical Integration Part II

The Fundamental Theorem of Algebra. Objective To use the Fundamental Theorem of Algebra to solve polynomial equations with complex solutions

Remember: Project Proposals are due April 11.

An Introduction to Support Vector Machines

Chapter 3. Two-Variable Regression Model: The Problem of Estimation

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad

ACTM State Calculus Competition Saturday April 30, 2011

a. (All your answers should be in the letter!

Statistics MINITAB - Lab 2

Chapter 2 - The Simple Linear Regression Model S =0. e i is a random error. S β2 β. This is a minimization problem. Solution is a calculus exercise.

Chapter I Vector Analysis

Review of linear algebra. Nuno Vasconcelos UCSD

CS434a/541a: Pattern Recognition Prof. Olga Veksler. Lecture 9

Maximal Margin Classifier

Pre-Calculus Summer Assignment

CIS587 - Artificial Intelligence. Uncertainty CIS587 - AI. KB for medical diagnosis. Example.

Numerical solution of fractional elliptic PDE's by the collocation method

NON-HOMOGENEOUS COMPOSITE BEAMS: ANALYTIC FORMULATION AND SOLUTION

Partially Observable Systems. 1 Partially Observable Markov Decision Process (POMDP) Formalism

Review of Gaussian Quadrature method

Generalized Least-Squares Regressions I: Efcient Derivations

Math1110 (Spring 2009) Prelim 3 - Solutions

Statistics 423 Midterm Examination Winter 2009

Systematic Error Illustration of Bias. Sources of Systematic Errors. Effects of Systematic Errors 9/23/2009. Instrument Errors Method Errors Personal

Chapter 3 Single Random Variables and Probability Distributions (Part 2)

The Ordinary Least Squares (OLS) Estimator

Lecture 13 APPROXIMATION OF SECOMD ORDER DERIVATIVES

is the calculated value of the dependent variable at point i. The best parameters have values that minimize the squares of the errors

Lectures - Week 4 Matrix norms, Conditioning, Vector Spaces, Linear Independence, Spanning sets and Basis, Null space and Range of a Matrix

Linear Approximation with Regularization and Moving Least Squares

Generalized Linear Methods

Support vector machines for regression

Department of Quantitative Methods & Information Systems. Time Series and Their Components QMIS 320. Chapter 6

CHAPTER - 7. Firefly Algorithm based Strategic Bidding to Maximize Profit of IPPs in Competitive Electricity Market

Regression. By Jugal Kalita Based on Chapter 17 of Chapra and Canale, Numerical Methods for Engineers

INTRODUCTION TO COMPLEX NUMBERS

Transcription:

CISE 3: umercl Methods Lecture 5 Topc 4 Lest Squres Curve Fttng Dr. Amr Khouh Term Red Chpter 7 of the tetoo c Khouh CISE3_Topc4_Lest Squre

Motvton Gven set of epermentl dt 3 5. 5.9 6.3 The reltonshp etween nd m not e cler we wnt to fnd n epresson for f 3 CISE3_Topc4_Le st Squre c Khouh

Motvton Model uldng : In engneerng two tpes of pplctons re encountered: Trend nlss. Predctng vlues of dependent vrle m nclude etrpolton eond dt ponts or nterpolton etween dt ponts. Hpothess testng. Comprng estng mthemtcl model wth mesured dt. Wht s the est mthemtcl model functon f tht represents the dtset? Wht s the est crteron to ssess the fttng of the functon to the dt? 3 c Khouh CISE3_Topc4_Lest Squre

Motvton Curve Fttng : Gven set of tulted dt fnd curve or functon tht est represents the dt. Gven:.The tulted dt.the form of the functon 3.The curve fttng crter Fnd the unnown coeffcents 4 c Khouh CISE3_Topc4_Lest Squre

Crter for Best Ft Lner model f o Mnmze the sum of the resdul errors for ll vlle dt: So s the sum of the solute vlues n n e e n n o Dtset of pts n lne pssng throu md pt fts? Dtset of 4 pts An lne Fllng n dshed lnes fts? Mnmum of the mmum error for n Indvdul pont. Ill-suted for regresson As t gves undue nfluence to n outler CISE3_Topc4_Le st Squre c Khouh 5

Lest Squres Regresson Lner Regresson Fttng strght lne to set of pred oservtons: n n. = + +e - slope - ntercept e- error or resdul etween the model nd the oservtons 6 c Khouh CISE3_Topc4_Lest Squre

Selecton of the functons CISE3_Topc4_Lest Squre c Khouh 7 re nown g g f Generl f Polnoml c f Qudrtc f Lner m n

Decde on the crteron. Lest Squres mn.ect n M tchngnterplton f f f f Chpter 7 Chpter 8 8 c Khouh CISE3_Topc4_Lest Squre

Lest Squres Gven. n. n The form of the functon s ssumed to e nown ut the coeffcents re unnown f e The dfference s ssumed to e the result of epermentl error 9 c Khouh CISE3_Topc4_Lest Squre

Determne the Unnowns We wnt tofnd to mnmze n f Howdo we otn nd tomnmze? c Khouh CISE3_Topc4_Lest Squre

Determne the Unnowns ecessr condton for the mnmum c Khouh CISE3_Topc4_Lest Squre

Emple Assume f 3 5. 5.9 6.3 ecessr condton for the mnmum CISE3_Topc4_Le st Squre c Khouh

Rememer CISE3_Topc4_Lest Squre c Khouh 3 n n n n g g d d

Emple orml Equtons CISE3_Topc4_Le st Squre c Khouh 4

Emple the orml Equtons gves Solvng CISE3_Topc4_Le st Squre c Khouh 5

Emple 3 sum 3 6 5. 5.9 6.3 7.3 4 9 4 5..8 8.9 35.8 6 c Khouh CISE3_Topc4_Lest Squre

Emple.6 4.5667 35.8 4 6 7.3 6 3 orml Equtons Solvng CISE3_Topc4_Le st Squre c Khouh 7

Fttng wth onlner Functons Emple.4.65.95.4.73..3.5.3 -.3 -. -.45.7. -.9.4 It f s requred tofnd functon of ln cos c e ths form to ft thedt. 8 c Khouh CISE3_Topc4_Lest Squre

Emple e f CISE3_Topc4_Le st Squre c Khouh 9 n ce cos ln e c f cos ln mnmum condton for the ecessr Equtons orml c c c c

Emple equtons Evlute thesums nd solve the norml cos ln cos cos cos cos ln ln ln cos ln ln 8 8 8 8 8 8 8 8 8 8 8 8 e e c e e e c e c CISE3_Topc4_Le st Squre c Khouh

How do ou judge performnce? Gven twoor more functons to ft thedt How do ou select the est? Answer : Determne the prmetersfor ech functon then compute for ech one.thefuncton resultngn smller s the est n the lest squre sense. c Khouh CISE3_Topc4_Lest Squre

Multple Regresson Emple: Gven the followng dt t 3..4.. ft 3 It s requred to determne functon of two vrles ft = + + c t to epln the dt tht s est n the lest squre sense. CISE3_Topc4_Le st Squre c Khouh

Soluton of Multple Regresson Construct the sum of the squre of the error nd derve the necessr condtons equtng the prtl dervtves wth respect to the unnown prmeters to zero then solve the equtons. t 3..4.. ft 3 CISE3_Topc4_Le st Squre c Khouh 3

Soluton of Multple Regresson condtons ecessr 4 4 4 4 t f ct c c f ct c f ct c f ct c ct t f CISE3_Topc4_Le st Squre c Khouh 4

5 Generl Lner Lest Squres z z Y Z Y A E Z A E mtr of t themesured vlues of oserved vlued of z z m z unnown coeffcents resduls c Khouh n m... m j z e re m ss functons theclculted vlues of m z m thendependent vrle thedependent vrle j z j the ss functons Mnmzed tng ts prtl dervtve w.r.t. ech of the coeffcents nd settng the resultng equton equl to zero CISE3_Topc4_Lest Squre

SE3: umercl Methods Lecture 3: onlner lest squres prolems + More Emples of nonlner lest squres Soluton of nconsstent equtons Contnuous lest squre prolems 6 c Khouh CISE3_Topc4_Lest Squre

Outlnes Emples of nonlner lest squres Soluton of nconsstent equtons Contnuous lest squre prolems CISE3_Topc4_Le st Squre c Khouh 7

onlner Prolem fnd Gven fucton of 3 orml CISE3_Topc4_Le st Squre e the form e Equtons 3 3 3.4 5. 9 e e e re e tht otned usng est ft thedt. c Khouh 8

Alterntve Soluton Lnerzton Method Gven 3.4 5. 9 fnd fucton of the form e tht est ft thedt. Defne z ln Let ln nd Instedof usng We wll use ln z ln 3 3 e z eser tosolve CISE3_Topc4_Le st Squre c Khouh 9

Emples Lnerzton Method Gven 3.3..4 fnd fucton of f Defne z theform / 3 tht est ft thedt. Let z CISE3_Topc4_Le st Squre We wll use 3 z c Khouh 3

Inconsstent Sstem of Equtons Prolem: Solve thefollowng sstemof equtons 3 Ths s 4. osoluton 4 6 nconsstent sstemof Redundnt Sstems Over-determned: m>n Equtons CISE3_Topc4_Le st Squre c Khouh 3

Inconsstent Sstem of Equtons Resons Inconsstent equtons m occur ecuse of errors n formultng the prolem errors n collectng the dt or computtonl errors. Soluton f ll lnes ntersect t one pont CISE3_Topc4_Le st Squre c Khouh 3

to mnmze the lest squres error nd Fnd 6 4 4. 3 We cn vew theequtons s 3 CISE3_Topc4_Le st Squre c Khouh 33 Inconsstent Sstem of Equtons Formulton s lest squres prolem

Soluton CISE3_Topc4_Lest Squre c Khouh 34 49.6 36.6 8 4 6 33.6 8 8 4.6 8 4 4. 8.3 6 4 4 4 9 36.6 8 6 4 8 4.6 8 4 8 8 4. 63 6 4 4 to mnmze nd Fnd 4. 3 6 4

Soluton ormlequtons: 8 9 36.6 49.6 Soluton :.48.9799 36.6 35 c Khouh CISE3_Topc4_Lest Squre

HW Chec WeCT for HW prolems nd due dte 36 c Khouh CISE3_Topc4_Lest Squre