Surrogate Models: Hans Bruun Nielsen IMM, Numerical Analysis Section
Surrogate Models: Hans Bruun Nielsen IMM, Numerical Analysis Section
Surrogate Models: Hans Bruun Nielsen IMM, Numerical Analysis Section
Residuals y − P (x )
i 16 i
Surrogate Models Poor approximation. 1
Data Fitting 123 data points with noise Knots κ0, κ1, . . . , κn Fit with natural cubic spline, n = 11
12 12
8 s(x) = cj Bj (x) 8
6 6
Seek (an approximation to) Y (x) j=1
4 4
8 0.6
0
6
4 0.4 −0.5
0
2.3 2.7 3.1 3.5
24.11.2004 Surrogate Models 5 24.11.2004 Surrogate Models 7
distance (22 values in ]0, 10[ cm) and time (every 0.1 second). Alternative approximating function.
Given data points (xi, yi), i = 1, 2, . . . , m
Data Fit
with distinct xi ∈ IRd and yi ∈ IR
Surrogate model
X
m X
n
1 1 s(x) = cT φ(x) + β T ψ(x) = cj φj (x) + βj ψj (x)
j=1 j=1
0 0 where the ψj are basis functions eg for a low order poly-
−1 −1
nomial that models a “global trend”, and Gaussian. θ = 50
5 5
4300
4200
4300
4200
φj (x) = φ(kx − xj k2)
4100 0 4100 0
Eg a Gaussian
φ(r) = e−θ r
2
Surrogate models based on Kriging and Radial Basis Functions (RBF) both have the form The solution can be reformulated to
T T
s(x) = c φ(x) + β ψ(x) . s(x) = cT φ(x) + β T ψ(x) .
Different derivation, but (under certain conditions on φ): same model. β is the “generalized least squares” solution to Ψβ ' y and c is found from the corresponding residual,
We consider interpolation, ie s(xi) = yi, i=1, . . . , m. ¡ T −1 ¢
Ψ Φ Ψ β = ΨT Φ−1y, c = Φ−1(y − Ψβ). Same solution!
Let Φ ∈ IRm×m, Ψ ∈ IRm×n be the matrices defined by 2 1
The process variance is estimated by σ = (y − Ψβ)T Φ−1(y − Ψβ) ,
m
Φij = φ(kxi − xj k2), Ψij = ψj (xi) and the MSE can be computed by
³ ¡ ¢−1 ´
The interpolation condition can be expressed as Ω(x) = σ 2 1 + uT ΨT Φ−1Ψ u − φT Φ−1φ , u = ΨT Φ−1φ − ψ .
Φ c + Ψ β = y.
In classical Kriging the correlation function φ is estimated from a variogram of the data, or it may be
2
In the case of RBF this is combined with the condition that c should be orthogonal to the range of Ψ, taken from a list. We may, eg, use a Gaussian: φj (x) = e−θ kx−xj k .
and we get the linear system of equations The results depend on θ, and assuming a Gaussian process the optimal choice is
à !à ! à ! à !à ! à !
Φ Ψ c y Φ Ψ c y θopt = argmin{ |Φ(θ)|1/m · σ 2(θ) } ( | · | = det(·) ) .
= ⇔ = .
ΨT 0 β 0 0 −ΨT Φ−1Ψ β −ΨT Φ−1y
¡ ¢−1 Matlab toolbox DACE (with Søren N. Lophaven and Jacob Søndergaard)
Solution: β = ΨT Φ−1Ψ P siT Φ−1y, c = Φ−1 (y − Ψβ) .
Available at http://www.imm.dtu.dk/∼hbn/dace/
1 25 1
Express s(x) as a linear predictor, s(x) = y T γ(x) . The error is 0
¡ ¢ ¡ ¢ 1.5 20
s(x) − y(x) = (Z + Ψβ)T γ(x) − z(x) + β T ψ(x) = Z T γ(x) − z(x) + β T ΨT γ(x) − ψ(x) 0.5 0.5
1 15
T 0.5 10
Unbiased predictor. Constraint: Ψ γ(x) − ψ(x) = 0 . 0 0
0 5
Mean squared error (MSE) 0 0.5 −0.5 −0.5
−0.5 −1 −0.5 −1 −0.5 0 0.5 −1 −0.5 0 0.5
£ ¤ £ ¤ ¡ ¢
Ω(x) = E (s(x) − y(x)) = E z 2 + γ T Z Z T γ − 2γ T Z x = σ 2 1 + γ T Φ γ − 2γ T ψ
p
Minimize Ω with respect to γ and subject to the constraint: Successively insert new data points where s(x) − .05 Ω(x) is minimal.
à !à ! à !
Φ Ψ γ φ
=
ΨT 0 λ ψ
24.11.2004 Surrogate Models 13 24.11.2004 Surrogate Models 15
0.5 10 1 1 1
0 0
0 5 0.5 0.5 0.5
0 0.5 −0.5 −0.5
−0.5 −1 −0.5 −1 −0.5 0 0.5 −1 −0.5 0 0.5
0 0 0
0 0.5 0 0.5 0 0.5
−0.5 −1 −0.5 −0.5 −1 −0.5 −0.5 −1 −0.5
m = 11. θ = 1.660
|s − f|. θ = 1.046 |s − f|. θ = 0.200 |s − f|. θ = 5.000
200 RMS. m = 11 |s − f|. m = 11 1.5 1.5 1.5
1.5 1.5 30 30 30
100 30
1 25 1 25 1 25
1 25 1
0
20 20 20
1.5 20
0.5 0.5 0.5
15 15 15
0.5 0.5
1 15
10 10 10
0.5 10 0 0 0
0 0 5 5 5
0 5
−0.5 −0.5 −0.5
0 0.5 −0.5 −0.5 −1 −0.5 0 0.5 −1 −0.5 0 0.5 −1 −0.5 0 0.5
−0.5 −1 −0.5 −1 −0.5 0 0.5 −1 −0.5 0 0.5
¡ ¢−1/2
m = 12. θ = 2.636 RBF. Inverse multiquadric: φj (x) = θkx − xj k2 + 1
200 RMS. m = 12 |s − f|. m = 12
1.5 1.5 m = 9. θ = 1.0e−004 m = 9. θ = 1.0e−003 m = 9. θ = 1.0e−002
100 30
200 200 200
1 25 1
0
100 100 100
1.5 20
0.5 0.5 0 0 0
1 15
1.5 1.5 1.5
0.5 10
0 0 1 1 1
0 5
0.5 0.5 0.5
0 0.5 −0.5 −0.5
−0.5 −1 −0.5 −1 −0.5 0 0.5 −1 −0.5 0 0.5
0 0 0
0 0.5 0 0.5 0 0.5
−0.5 −1 −0.5 −0.5 −1 −0.5 −0.5 −1 −0.5
m = 13. θ = 2.636
200 RMS. m = 13 |s − f|. m = 13 |s − f|. m = 9 |s − f|. m = 9 |s − f|. m = 9
1.5 1.5 1.5 1.5 1.5
100 30
1 25 1 1 1 1
0
1.5 20
0.5 0.5 0.5 0.5 0.5
1 15
0.5 10
0 0 0 0 0
0 5
• Choice of θ in RBF
• ···