Lecture 19 Flashcards

1
Q

Correlation coefficient

A
line fit.
di = yi-yfit
a = Σ(di)^2
b = Σ(yi-ymean)^2
rvalue = √(1-a/b) correlation coefficient
R = 1 → good fit
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Linear least squares = line ?

A

No, linear in its coefficient !

OK if a vandermonde matrix can be written.

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

Fitting a line {{t1, y1}, …, {tm, ym}}

A

Overdetermined system Ax = b ([[t1 1],…,[tm 1]] [a b] = [[y1],…[ym]]), A mxn where m>n
In most cases, no exact solution because b∉range(A) and Ax≅b

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

Least squares

A

A mxn with m>n. Find x minimising residual r=b-Ax
||Ax-b||_2^2 = (Ax-b).T@(Ax-b)
∇ = 2A.T@(Ax-b) = 0
so A.T@A@x = A.T@b (normal equations)
Minimum because Hessian=2A.T@A is positive definite (symmetric, eigenvalues >= 0)

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

A matrix least squares

A
Vandermonde matrix
1 t1 t1^2 ...
1 t2 t2^2 ...
... ... ...
1 tm tm^2 ...
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Residual

A

r= ||Ax-b||_2 = ||yfit-y||_2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
y = c1 + c2.sin(tΠ) + c3.sin(tΠ/2) + c4.sin(tΠ/4)
Value A_{23} ?
ti yi
.5 .72
1 .79
1.5 .72
A

sin(t2.Π/2) = sin(Π/2) = 1

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

Linear least squares solution?

A

Always

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

Columns of A linearly independant

A

rank(A) = n and solution of normal equations unique (A.T@A only positive eigenvalues), otherwise rank(A) less n, A rank-deficient (A.T@A singular) and solution not unique

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

Cost solve normal equations

A
A.T@A@x=A.T@b
cost A.T@A = mn^2
cost A.T@b = mn
factorization A.T@A n^3 (LU 2/3n^3, cholesky 1/3n^3)
solve with factorization n^2
Overall cost mn^2 (> n^3 because m>n)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly