Lecture 22 Flashcards

1
Q

Interpolation VS data fitting

A

Interpolation: we want a linear combination of basis functions s.t. it passes through each data points (1 unique solution, m points - m basis functions)
Least squares: we have a given model, we want parameters s.t. it fits the best (lot of points, noise) - often useful to find a function to integrate/derivate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Interpolation

A

Given (ti,yi), find f s.t. f(ti)=yi (interpolant or interpolation function)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Basis functions

A

A set of elements in a vector space V is a basis if:

  • they’re lin independent
  • every element of V can be written as a linear combination of the basis elements
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
V=set of functions f(t)=at+b, appropriate basis function?
{1,0},{0,1}
{1, 0}
{1, x}
{0, x}
A

f(t) = a.ɸ1(t) + b.ɸ2(t)
(ɸ1(t) = t, ɸ2(t) = 1)
So: {1, x}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Interpolation function

A
f(t) = Σ_{j=0}^{n-1} xj.ɸj(t)
xj : coefficients
ɸj : basis functions
1) Select the basis functions
2) Find the coefficients s.t f(ti)=yi for all i
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Interpolation matrix form (general Vendermonde matrix)

A
Ax = y
[[ɸ0(t0) ɸ1(t0) ... ɸn-1(t0)]
...
[ɸ0(tn-1) ...    ɸn-1(tn-1)]]
(mxn, each column corresponds to a basis function > full rank matrix, each row corresponds to a data point)
x
[[x0], ..., [xn-1]]
=
[[y0], ..., [ym-1]]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Interpolation dimensions of A

A
  • m>n then data fitting (more eq than unknowns, overdetermined)
  • m=n then unique solution (same number of points/basis functions)
  • m
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Interpolation with monomials

A

{1, t, t^2, …}, i.e. ɸj(t)=t^j (j=0,..,n-1 & m=n)
f(t) = Σ_{j=0}^{n-1} xj.t^j = p_{n-1}(t) (polynomial of degree n-1, n coefficients)
Ax = y
[[1 t0 t0^2 … t0^n-1], …, [1 tn-1 tn-1^2 … tn-1^n-1]] [[x0], …, [xn]] = [[y0], …,[yn]]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How many interpolants of degree at most (n-1) can be found to pass through n points?

A

1 (n functions, from 0 to n-1, n datapoint needed to obtain unique interpolation)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

If we use different polynomial basis functions (not monomial) whose highest degree is n-1 (n points), we might obtain a different interpolating function

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Cost interpolate and get new points

A
Solve O(n^3), but n small.
New points n^2 (matrix vector mult)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Error in interpolation

A

If ti are equally spaced on an interval of length h and f(t) is sufficiently smooth:
error = O(h^n) = O(h^{degree+1})
error = |f(t) - pn-1(t)| (0 at points ti)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
Using 4 equispaced interpolation nodes, which of these functions would be interpolated exactly with monomial basis functions?
A) f(x) = 3x^3+4x^2
B) f(x) = sin(x)
C) f(x) = 3
D) f(x) = 5x^4+6x+7
A

4 nodes, at most we can interpolate p3(t) = x0 + x1t + x2t^2 + x3t^3
So A and C.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

We compute p5(t) for the interval [-1,1] and obtain an error ~ 10^{-1}
what error if interval reduced to [-.5,.5]?

A

0.0015

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Integrals using interpolants

A

Int sum(0>n-1) xj.t^j = sum(0>n-1)xj Int t^j = sum(0>n-1) xj t^{j+1}/(j+1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Derivatives from interpolants

A

g(t) = sum(0>n-1) xj.phij(t) (approximation Ax=y)

then g’(t) = sum(0>n-1) xj.phij’(t) (approximation A’x=g’)