Lecture 22
Computational Methods for GPs
Colin Rundel 04/12/2017
1
Lecture 22 Computational Methods for GPs Colin Rundel 04/12/2017 - - PowerPoint PPT Presentation
Lecture 22 Computational Methods for GPs Colin Rundel 04/12/2017 1 GPs and Computational Complexity 2 2 exp n 1 i The problem with GPs x n 2 j 2 ij d ij Update covariance parameter? n 3 log 2 2 n 1 Unless you are lucky (or
1
2
1
ij 2 exp
ij 2 n 1i j
3
1
ij 2 exp
ij 2 n 1i j
3
ij 2 exp
ij 2 n 1i j
3
n 1i=j
3
4
4
4
4
4
4
10 20 30 2500 5000 7500 10000
n time (secs) method
chol inv LU inv QR inv
5
Step CPU (secs) CPU+GPU (secs)
1. Calc.
p, po
1.080 0.046 23.0 2.
p po 1
0.467 0.208 2.3 3. Calc.
p o
chol
p o
Z 0.049 0.052 0.9 4.
0.129 0.127 1.0 Total 1.732 0.465 3.7
6
Step CPU (secs) CPU+GPU (secs)
1.
1.080 0.046 23.0 2.
0.467 0.208 2.3 3.
0.049 0.052 0.9 4.
0.129 0.127 1.0 Total 1.732 0.465 3.7
6
10 20 30 2500 5000 7500 10000
n time (secs) method
chol inv LU inv QR inv
comp
cpu gpu
7
0.1 10.0 2500 5000 7500 10000
n time (secs) method
chol inv LU inv QR inv
comp
cpu gpu
8
1 10 2500 5000 7500 10000
n Relative performance method
chol inv LU inv QR inv
9
0.0 2.5 5.0 7.5 2500 5000 7500 10000
n time (sec) comp
cpu gpu
Matrix Multiplication 10
0.01 0.1 1 10 100 1000 2048 8192 32768 131072 Execution time, seconds (log scale) Matrix dimension, n (log scale) Cholesky Decomposition 6 cores 60 cores 816 cores 12480 cores 49920 cores
11
12
13
n×m =
n×n diag(S) n×m
m×m
n m
n n diag S n m
m m
n k diag S k k
k m 14
n×m =
n×n diag(S) n×m
m×m
n×m =
n×n diag(˜
n×m
m×m
n×k diag(˜
k×k
k×m 14
t
15
t
15
m
i=1 n
j=1
1/2
16
m
i=1 n
j=1
1/2
10 20 30 40 50 5 10 15
Singular Values 10 20 30 40 50 5 10 15
Error (Frob. norm) 16
10 20 30 40 50 1 2 3 4
Singular Values 10 20 30 40 50 2 4 6 8 10
Rank Error (Frob. norm) 17
n×m
n×m + U n×k S k×k Vt k×m
1.
1 is k
1
1U is k
18
n×m
n×m + U n×k S k×k Vt k×m
18
n i 1
2
1
1U
19
n
i=1
1
1U
19
n
i=1
19
20
21
n×k
k×k
k×n
22
0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 −3 −2 −1 1 2 3 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 −3 −2 −1 1 2 23
0.0 0.4 0.8 0.0 0.4 0.8
True Field
−3 −2 −1 1 2 3 0.0 0.4 0.8 0.0 0.4 0.8
PP − 5 x 5 knots
−2 −1 1 0.0 0.4 0.8 0.0 0.4 0.8
PP − 10 x 10 knots
−3 −2 −1 1 2 0.0 0.4 0.8 0.0 0.4 0.8
PP − 15 x 15 knots
−3 −2 −1 1 2 0.0 0.4 0.8 0.0 0.4 0.8
Full GP
−3 −2 −1 1 2 0.0 0.4 0.8 0.0 0.4 0.8
−2.0 −1.5 −1.0 −0.5 0.0 0.5 1.0 1.5 0.0 0.4 0.8 0.0 0.4 0.8
−3 −2 −1 1 2 0.0 0.4 0.8 0.0 0.4 0.8
−3 −2 −1 1 2
24
30 40 50 50 100 150 200
time error knots
− 25 100 225
model
Full GP PP
25
phi sigma.sq tau.sq 4 5 6 7 8 9 1.2 1.5 1.8 2.1 0.1 0.2 0.3 0.4 0.5
Parameter Value model
Full GP PP
True
knots
− 25 100 225
26
27
28
29
30
5 10 15 10 20 30
time error method
lr1 lr1 mod pp pp mod
Strong Dependence
10 20 30 10 20 30
time error method
lr1 lr1 mod pp pp mod
Weak Dependence
31
32
33