Beruflich Dokumente
Kultur Dokumente
0.05
0.1
0.15
0.2
0.25
time t (seconds)
0.3
0.35
0.4
1 , 2 > 0 areknown.
Trigonometric fit
400
400
200
200
0
0
10
20
0
0
10
20
i = 1, 2, . . . , m.
M (x, t) =
xj fj (t).
j=1
Here the functions fj (x) are chosen either because the reect the
underlying physical/chemical/. . . model (parameter estimation) or
because they are easy to work with (data approximation).
The order of the t n should be somewhat smaller than the
number m of data points.
i = 1, 2, . . . , m .
min
x
ri (x) = min
x
i=1
)2
yi M (x, ti ) .
i=1
i=1
|ri (x)| = min
yi M (x, ti )
x
i=1
i = 1, 2, . . . , m .
The data errors: ei are are unknown, but we may have some
statistical information about them.
Our linear fitting model:
M (x, t) =
xj fj (t),
j=1
i=1
ri (x) = min
x
(
i=1
)2
yi M (x, ti ) ,
i = 1, 2, . . . , m
= yi M (x, ti )
(
) (
)
= yi (ti ) + (ti ) M (x, ti )
(
)
= ei + (ti ) M (x, ti ) .
10
Matrix-Vector Notation
Dene the matrix A Rmn and the vectors y, r Rm as follows,
f (t ) f2 (t1 ) fn (t1 )
y
r
1 1
1
1
f1 (t2 ) f2 (t2 ) fn (t2 )
y2
r2
A=
..
.. , y = .. , r = .. ,
..
.
.
.
.
.
f1 (tm ) f2 (tm ) fn (tm )
ym
rm
i.e., y is the vector of observations, r is the vector of residuals, and
the matrix A is constructed such that the jth column is the jth
model basis function sampled at the abscissas t1 , t2 , . . . , tm . Then
r = y Ax
and
(x) =
i=1
minx (x).
Contour Plots
NMR problem: xing x3 = 0.3 gives a problem minx (x) with two
unknowns x1 and x2 .
Left (x) versus x. Right level curves {x R2 | (x) = c}.
11
12
f2 (t) = e2 t ,
1.0000e+000
9.3678e-001
8.7756e-001
8.2208e-001
7.7011e-001
7.2142e-001
1.0000e+000
1.0000e+000
1.0000e+000
1.0000e+000
1.0000e+000
1.0000e+000
f3 (t) = 1.
13
x2 = 1.973,
x3 = 0.305.
The exact parameters used to generate the data are 1.27, 2.04, 0.3 .
Measured data and least squares fit
3
2
1
0
0
0.05
0.1
0.15
0.2
0.25
time t (seconds)
0.3
0.35
0.4
Introduction of Weights
Some statistical assumptions about the noise:
E(ei ) = 0,
E(e2i ) = i2 ,
i = 1, 2, . . . , m,
yi M (x, ti )
ri (x)
= min
.
min
x
x
i
i
i=1
i=1
Identical standard deviations i = we have:
min 2
x
(yi M (x, ti ))
i=1
14
ri (x)
=
E
E
2
i
i
i=1
i=1
( 2)
(
)
m
m
ei
((ti ) M (x, ti ))2
=
E 2 +
E
2
i
i
i=1
i=1
(
)
m
2
E ((ti ) M (x, ti ))
= m+
,
2
i
i=1
where we used that E(ei ) = 0 and E(e2i ) = i2 .
Intuitive result:
we can allow the expected value of the approximation errors to be
larger for those data (ti , yi ) that have larger standard deviations
(i.e., larger errors).
15
wi = i1 ,
i = 1, 2, . . . , m.
)2
m (
ri (x)
i=1
= W (y A x)22 .
16
17
r = b A x.
18
19
xT AT (b A x) = 0
xT AT b xT AT A x = 0
xT (AT b AT A x) = 0
x = (AT A)1 AT b.
20
A=Q
with
Q Rmm ,
0
R1 Rnn ,
Q Q T = Im ,
Q v2 = v2 for any v.
A = Q1 R1 , where Q1 Rmn .
R1
.
[Q,R] = qr(A) full QR factorization, Q = Q and R =
0
Splitting: Q = ( Q1 , Q2 )
21
2
2
R
R
b Q 1 x
=
Q QT b 1 x
0
0
2
2
2
2
T
QT1 b
R1
Q1 b R1 x
x =
T
T
Q
b
0
Q
b
2
2
2
x = R11 QT1 b .
22
1.00
0.80
0.64
..
3.2 105
2.5 105
2.0 105
1.00
0.94
0.88
..
.
4.6 102
4.4 102
0.597
0.281 0.172
0.479
0.139 0.071
0.384
0.029 0.002
..
..
..
.
.
.
0.224
3.02
7.81
Q1 b =
5.16
,
4.32 .
3.78
1.19
..
.
,
4.1 102
1.67 2.40
R1 =
1.54
0
0
0
23
Must choose the tting model M (x, t) = j=1 xj fj (t) such that
the data errors and the approximation errors are balanced.
Hence we must analyze the residuals r1 , r2 , . . . , rm :
1. The model captures the pure-data function well enough
when the approximation errors are smaller than the data
errors. Then the residuals are dominated by the data errors
and some of the statistical properties of the errors carry over to
the residuals.
2. If the tting model does not capture the behavior of the
pure-data function, then the residuals are dominated by the
approximation errors. Then the residuals will tend to behave
as a sampled signal and show strong local correlations.
Use the simplest model (i.e., the smallest n) that satises 1.
24
25
26
2 n+ n
+ 1,
m
u2 =
(u 1) (u 2)
.
m1
27
m1
i=1
ri ri+1 ,
1
T =
ri2 .
m 1 i=1
28
29
30
Covariance Matrices
Recall that bi = (ti ) + ei . Covariance matrix for b:
(
)
T
Cov(b) = E(b b ) = E ( + e) ( + e)
)
(
T
T
T
T
= E + e + e + e e = E(e eT ).
Covariance matrix for x :
( T 1 T )
= Cov(xi xj ),
[Cov(x )]ii
= st.dev(xi )2
i = j
2 Q2 QT2
E(r 22 ) =
QT2 22 + (m n) 2 .
Hence, if the approximation errors are smaller than the data errors
then r 22 (m n) 2 and the scaled residual norm
r 2
s =
mn
31
32
Trigonometric fit
500
Residual norm || r * ||
250
0
0
20
250
10
20
0
0
20
10
0
0
Residual norm || r * ||
10
20
10
10
20
0
0
10
20