Presentation is loading. Please wait.

Presentation is loading. Please wait.

By Adam Mallen.  What is it?  How is it different from regression?  When would you use it?  What can go wrong?  How do we find the interpolating.

Similar presentations


Presentation on theme: "By Adam Mallen.  What is it?  How is it different from regression?  When would you use it?  What can go wrong?  How do we find the interpolating."— Presentation transcript:

1 By Adam Mallen

2  What is it?  How is it different from regression?  When would you use it?  What can go wrong?  How do we find the interpolating polynomial?  Can you do this in Matlab?  What else?

3  The interpolating polynomial is the polynomial of least degree which passes through all the data points  Formally:  A unique solution to this problem is guaranteed

4 XY 0-10 103 20-30 306 4010 50-2 6015

5 XY 0-10 103 20-30 306 4010 50-2 6015

6  Interpolation models must take on the exact values of the known data points  Regression models minimize the residuals  Given n+1 data points: ◦ The “best fit” polynomials of degree < n form regression models. ◦ The “best fit” polynomial of degree = n is the interpolating polynomial because the sum of the residuals is exactly zero.

7

8

9

10  Regression models assume that measurements have noise.  Regression models estimate f(x) and may be used for forecasting future and past values.  Interpolation models may be suitable when measurements are believed to be exact.  Interpolation models estimate values between known data points.  NOT for forecasting

11

12  Runge Phenomenon  Divergence for some selection of nodes  Splines can help solve these problems  However, … ◦ Splines may only be differentiable a certain number of times at the data points. ◦ Polynomials are infinitely differentiable ◦ Splines can be more complicated to compute and store.

13

14

15

16

17

18  We can represent this system of equations as

19  function result = poly_interp(x, y)  % x and y are column vectors with the x and y values of the data points   % there are n+1 data points  n = length(x) - 1;   % construct the Vandermonde matrix  V = zeros(n+1,n+1);  for i=1:n+1  for j=1:n+1  V(i,j) = x(i).^(j-1);  end %for   % solve the system of equations  alpha = V\y;   result = fliplr(alpha');  end

20  Lagrange form of the interpolating Polynomial  Newton form of the interpolating Polynomial  Chebyshev nodes  Hermite interpolation problem  Harmonic function interpolation  Lebesgue constants

21


Download ppt "By Adam Mallen.  What is it?  How is it different from regression?  When would you use it?  What can go wrong?  How do we find the interpolating."

Similar presentations


Ads by Google