1 / 33

SE301: Numerical Methods Topic 4: Least Squares Curve Fitting Lectures 18-19:

SE301: Numerical Methods Topic 4: Least Squares Curve Fitting Lectures 18-19:. KFUPM Read Chapter 17 of the textbook. Lecture 18 Introduction to Least Squares. Motivation. Given a set of experimental data:. The relationship between x and y may not be clear.

rhahn
Download Presentation

SE301: Numerical Methods Topic 4: Least Squares Curve Fitting Lectures 18-19:

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SE301: Numerical MethodsTopic 4:Least Squares Curve FittingLectures 18-19: KFUPM Read Chapter 17 of the textbook KFUPM

  2. Lecture 18Introduction to Least Squares KFUPM

  3. Motivation Given a set of experimental data: • The relationship between x and y may not be clear. • We want to find an expression for f(x). 1 2 3 KFUPM

  4. Motivation - Model Building • In engineering, two types of applications are encountered: • Trend analysis: Predicting values of dependent variable, may include extrapolation beyond data points or interpolation between data points. • Hypothesis testing: Comparing existing mathematical model with measured data. • What is the best mathematical model (function f , y) that represents the dataset yi? • What is the best criterion to assess the fitting of the function y to the data? KFUPM

  5. Motivation - Curve Fitting Given a set of tabulated data, find a curve or a function that best represents the data. Given: • The tabulated data • The form of the function • The curve fitting criteria Find the unknown coefficients KFUPM

  6. Least Squares Regression Linear Regression • ‌Fitting a straight line to a set of paired observations: (x1, y1), (x2, y2),…,(xn, yn). y=a0+a1x+e a1-slope. a0-intercept. e-error, or residual, between the model and the observations. KFUPM

  7. Selection of the Functions KFUPM

  8. Decide on the Criterion Chapter 17 Chapter 18 KFUPM

  9. Least Squares Given: The form of the function is assumed to be known but the coefficients are unknown. The difference is assumed to be the result of experimental error. KFUPM

  10. Determine the Unknowns KFUPM

  11. Determine the Unknowns KFUPM

  12. Example 1 KFUPM

  13. Remember KFUPM

  14. Example 1 KFUPM

  15. Example 1 KFUPM

  16. Example 1 KFUPM

  17. Example 1 KFUPM

  18. Example 2- Fitting with Nonlinear Functions - KFUPM

  19. Example 2 KFUPM

  20. Example 2 KFUPM

  21. How Do You Judge Performance? KFUPM

  22. Multiple Regression Example: Given the following data: It is required to determine a function of two variables: f(x,t) = a + b x + c t to explain the data that is best in the least square sense. KFUPM

  23. Solution of Multiple Regression Construct , the sum of the square of the error and derive the necessary conditions by equating the partial derivatives with respect to the unknown parameters to zero, then solve the equations. KFUPM

  24. Solution of Multiple Regression KFUPM

  25. Lecture 19Nonlinear Least Squares Problems + More Examples of Nonlinear Least Squares Solution of Inconsistent Equations Continuous Least Square Problems KFUPM

  26. Nonlinear Problem Given: KFUPM

  27. Alternative Solution(Linearization Method) Given: KFUPM

  28. Example (Linearization Method) Given: KFUPM

  29. Inconsistent System of Equations KFUPM

  30. Inconsistent System of Equations- Reasons - • Inconsistent equations may occur because of: • Errors in formulating the problem, • Errors in collecting the data, or • Computational errors. Solution exists if all lines intersect at one point. KFUPM

  31. Inconsistent System of Equations- Formulation as a Least Squares Problem- KFUPM

  32. Solution KFUPM

  33. Solution KFUPM

More Related