1 Curve-Fitting Spline Interpolation. 2 Curve Fitting Regression Linear Regression Polynomial Regression Multiple Linear Regression Non-linear Regression.

Slides:



Advertisements
Similar presentations
Splines and Piecewise Interpolation
Advertisements

Mark Trew CT Halfway Down Halfway down the stairs Is a stair Where I sit. There isn't any Other stair Quite like It. I'm not at the bottom, I'm.
Numeriska beräkningar i Naturvetenskap och Teknik Today’s topic: Approximations Least square method Interpolations Fit of polynomials Splines.
Numerical Methods.  Polynomial interpolation involves finding a polynomial of order n that passes through the n+1 points.  Several methods to obtain.
Interpolation A method of constructing a function that crosses through a discrete set of known data points. .
CS 445/645 Fall 2001 Hermite and Bézier Splines. Specifying Curves Control Points –A set of points that influence the curve’s shape Knots –Control points.
Data mining and statistical learning - lecture 6
MATH 685/ CSI 700/ OR 682 Lecture Notes
Selected from presentations by Jim Ramsay, McGill University, Hongliang Fei, and Brian Quanz Basis Basics.
Chapter 18 Interpolation The Islamic University of Gaza
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
Computational Methods in Physics PHYS 3437
ES 240: Scientific and Engineering Computation. InterpolationPolynomial  Definition –a function f(x) that can be written as a finite series of power functions.
Curve-Fitting Interpolation
CURVE FITTING ENGR 351 Numerical Methods for Engineers
Curve-Fitting Regression
Engineering Computation Curve Fitting: Interpolation 1
Curve-Fitting Polynomial Interpolation
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 181 Interpolation Chapter 18 Estimation of intermediate.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 23 CURVE FITTING Chapter 18 Function Interpolation and Approximation.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 24 Regression Analysis-Chapter 17.
ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW II.
Lecture 9 Interpolation and Splines. Lingo Interpolation – filling in gaps in data Find a function f(x) that 1) goes through all your data points 2) does.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 181 Interpolation.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Interpolation Chapter 18.
Chapter 6 Numerical Interpolation
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 21 CURVE FITTING Chapter 18 Function Interpolation and Approximation.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 171 Least.
Scientific Computing Linear and Quadratic Splines.
Regression analysis Control of built engineering objects, comparing to the plan Surveying observations – position of points Linear regression Regression.
Lecture 22 - Exam 2 Review CVEN 302 July 29, 2002.
Review of Interpolation. A method of constructing a function that crosses through a discrete set of known data points.
CISE301_Topic41 CISE301: Numerical Methods Topic 4: Least Squares Curve Fitting Lectures 18-19: KFUPM Read Chapter 17 of the textbook.
Today’s class Spline Interpolation Quadratic Spline Cubic Spline Fourier Approximation Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 1.
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
Curve-Fitting Regression
CS559: Computer Graphics Lecture 19: Curves Li Zhang Spring 2008.
CHAPTER 3 NUMERICAL METHODS
Lecture 22 Numerical Analysis. Chapter 5 Interpolation.
Computers in Civil Engineering 53:081 Spring 2003 Lecture #15 Spline Interpolation.
Lecture 16 - Approximation Methods CVEN 302 July 15, 2002.
Introduction to Numerical Analysis I MATH/CMPSC 455 Splines.
Cubic Spline Interpolation. Cubic Splines attempt to solve the problem of the smoothness of a graph as well as reduce error. Polynomial interpolation.
Spline Interpolation A Primer on the Basics by Don Allen.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Chapter 15 General Least Squares and Non- Linear.
Principles of Extrapolation
CSE 2813 Discrete Structures Solving Recurrence Relations Section 6.2.
By: Mark Coose Joetta Swift Micah Weiss. What Problems Can Interpolation Solve? Given a table of values, find a simple function that passes through the.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Chapter 17 and 18 Interpolation.
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
Interpolation - Introduction
Computational Methods CMSC/AMSC/MAPL 460 Polynomial Interpolation Ramani Duraiswami, Dept. of Computer Science.
NUMERICAL DIFFERENTIATION Forward Difference Formula
Curve-Fitting Spline Interpolation
Numerical Analysis Lecture 25.
Interpolation Estimation of intermediate values between precise data points. The most common method is: Although there is one and only one nth-order.
Chapter 18.
Solving Polynomial Functions
Chapter 15 Curve Fitting : Splines
Reading Between the Lines
Chapter 18.
Today’s class Multiple Variable Linear Regression
Spline Interpolation Class XVII.
Linear regression Fitting a straight line to observations.
Splines and Piecewise Interpolation
MATH 174: Numerical Analysis I
Splines There are cases where polynomial interpolation is bad
Half Test Review! Day 6.
SKTN 2393 Numerical Methods for Nuclear Engineers
Theory of Approximation: Interpolation
Presentation transcript:

1 Curve-Fitting Spline Interpolation

2 Curve Fitting Regression Linear Regression Polynomial Regression Multiple Linear Regression Non-linear Regression Interpolation Newton's Divided-Difference Interpolation Lagrange Interpolating Polynomials Spline Interpolation

3 For some cases, polynomials can lead to erroneous results because of round off error and overshoot. Alternative approach is to apply lower-order polynomials to subsets of data points. Such connecting polynomials are called spline functions.

4

5 (a)Linear spline –Derivatives are not continuous –Not smooth (b) Quadratic spline –Continuous 1 st derivatives (c) Cubic spline –Continuous 1 st & 2 nd derivatives –Smoother

6 Quadratic Spline

7 Spline of Degree 2 A function Q is called a spline of degree 2 if –The domain of Q is an interval [a, b]. –Q and Q' are continuous functions on [a, b]. –There are points x i (called knots) such that a = x 0 < x 1 < … < x n = b and Q is a polynomial of degree at most 2 on each subinterval [x i, x i+1 ]. A quadratic spline is a continuously differentiable piecewise quadratic function.

8 Exercise Which of the following is a quadratic spline?

9 Exercise (Solution)

10 Observations n+1 points n intervals Each interval is connected by a 2 nd -order polynomial Q i (x) = a i x 2 + b i x + c i, i = 0, …, n–1. Each polynomial has 3 unknowns Altogether there are 3n unknowns Need 3n equations (or conditions) to solve for 3n unknowns Quadratic Interpolation

11 1.Interpolating conditions –On each sub interval [x i, x i+1 ], the function Q i (x) must satisfy the conditions Q i (x i ) = f(x i ) and Q i (x i+1 ) = f(x i+1 ) –These conditions yield 2 n equations Quadratic Interpolation ( 3n conditions)

12 Quadratic Interpolation ( 3n conditions) 2.Continuous first derivatives –The first derivatives at the interior knots must be equal. –This adds n-1 more equations: We now have 2n + (n – 1) = 3n – 1 equations. We need one more equation.

13 3.Assume the 2 nd derivatives is zero at the first point. –This gives us the last condition as Quadratic Interpolation ( 3n conditions) –With this condition selected, the first two points are connected by a straight line. –Note: This is not the only possible choice or assumption we can make.

14 Example Fit quadratic splines to the given data points. i0123 xixi f(xi)f(xi)

15 Example (Solution) 1. Interpolating conditions 2. Continuous first derivatives 3. Assume the 2nd derivatives is zero at the first point.

16 Example (Solution) We can write the system of equations in matrix form as Notice that the coefficient matrix is sparse.

17 Example (Solution) The system of equations can be solved to yield Thus the quadratic spline that interpolates the given points is

18 Efficient way to derive quadratic spline

19 Efficient way to derive quadratic spline

20 Efficient way to derive quadratic spline

21 Cubic Spline Spline of Degree 3 A function S is called a spline of degree 3 if –The domain of S is an interval [a, b]. –S, S' and S" are continuous functions on [a, b]. –There are points t i (called knots) such that a = t 0 < t 1 < … < t n = b and Q is a polynomial of degree at most 3 on each subinterval [t i, t i+1 ].

22 Cubic Spline ( 4n conditions) 1.Interpolating conditions ( 2n conditoins). 2.Continuous 1 st derivatives ( n-1 conditions) The 1 st derivatives at the interior knots must be equal. 3.Continuous 2 nd derivatives ( n-1 conditions) The 2 nd derivatives at the interior knots must be equal. 4.Assume the 2 nd derivatives at the end points are zero ( 2 conditions). This condition makes the spline a "natural spline".

23 Efficient way to derive cubic spline

24 Summary Advantages of spline interpolation over polynomial interpolation The conditions that are used to derive the quadratic and cubic spline functions Characteristics of cubic spline –Overcome the problem of "overshoot" –Easier to derive (than high-order polynomial) –Smooth (continuous 2 nd -order derivatives)