By Adam Mallen. What is it? How is it different from regression? When would you use it? What can...
-
Upload
madlyn-short -
Category
Documents
-
view
220 -
download
3
Transcript of By Adam Mallen. What is it? How is it different from regression? When would you use it? What can...
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?
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
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.
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
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.
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 end %for % solve the system of equations alpha = V\y; result = fliplr(alpha'); end
Lagrange form of the interpolating Polynomial
Newton form of the interpolating Polynomial Chebyshev nodes Hermite interpolation problem Harmonic function interpolation Lebesgue constants