gaussian processes - harvard universityhea- · 2018. 1. 10. · bombcat.giffit. what happened? 5.0...

61
Gaussian Processes a practical introduction to for astronomy Dan Foreman-Mackey Flatiron Institute // dfm.io // github.com/dfm // @exoplaneteer

Upload: others

Post on 14-Mar-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

Gaussian Processesa practical introduction to

for astronomy

Dan Foreman-Mackey Flatiron Institute // dfm.io // github.com/dfm // @exoplaneteer

Page 2: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

Resources

a gaussianprocess.org/gpml

b george.readthedocs.io

c dfm.io/gp.js

d github.com/dfm/gp

e [email protected]

Page 3: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

1

Gaussian Processes

Page 4: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

Screenshot from ui.adsabs.harvard.edu 

the number of published astronomy papers containing the words "gaussian process"

Page 5: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

Photo by Adi Goldstein on Unsplash

Don't you think you should be using Gaussian Processes?

Page 6: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

Photo by Adi Goldstein on Unsplash

Don't you think you should be using Gaussian Processes?

After today, you will be.

Page 7: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint
Page 8: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

Cool.

Page 9: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

Today

1 Why?

2 What?

3 How?

Page 10: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

2

The importance of correlated noise a motivating example

Page 11: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

�5.0 �2.5 0.0 2.5 5.0x

�1.0

�0.5

0.0

0.5

y

Page 12: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

�5.0 �2.5 0.0 2.5 5.0x

�1.0

�0.5

0.0

0.5

y

truth

Page 13: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

�5.0 �2.5 0.0 2.5 5.0x

�1.0

�0.5

0.0

0.5

y

assuming independent noise

fit

Page 14: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

�5.0 �2.5 0.0 2.5 5.0x

�1.0

�0.5

0.0

0.5

y

assuming independent noise

fitBOMBCAT.GIF

Page 15: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

What happened?

Page 16: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

�5.0 �2.5 0.0 2.5 5.0x

�1.0

�0.5

0.0

0.5

y

Page 17: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

�5.0 �2.5 0.0 2.5 5.0x

�1.0

�0.5

0.0

0.5

y

Page 18: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

data

poin

t n

datapoint m

The true covariance matrix

Page 19: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

log p({yn} | ✓) = �1

2

NX

n=1

[yn �mn]

2

�n2

+ log(2⇡ �n2)

log p({yn} | ✓) = �1

2

rT C�1 r � 1

2

log detC � N

2

log(2⇡)

r =

0

B@y1 �m1

...yN �mN

1

CA C =

0

B@�1

2 0. . .

0 �N2

1

CAand

if...

Page 20: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

log p({yn} | ✓) = �1

2

NX

n=1

[yn �mn]

2

�n2

+ log(2⇡ �n2)

log p({yn} | ✓) = �1

2

rT C�1 r � 1

2

log detC � N

2

log(2⇡)

r =

0

B@y1 �m1

...yN �mN

1

CA C =

0

B@�1

2 0. . .

0 �N2

1

CAand

if...

Page 21: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

log p({yn} | ✓) = �1

2

NX

n=1

[yn �mn]

2

�n2

+ log(2⇡ �n2)

log p({yn} | ✓) = �1

2

rT C�1 r � 1

2

log detC � N

2

log(2⇡)

r =

0

B@y1 �m1

...yN �mN

1

CA C =

0

B@�1

2 0. . .

0 �N2

1

CAand

if...

* Note: this part has everything to do with Gaussian processes

*

Page 22: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

�5.0 �2.5 0.0 2.5 5.0x

�1.0

�0.5

0.0

0.5

y

Page 23: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

�5.0 �2.5 0.0 2.5 5.0x

�1.0

�0.5

0.0

0.5

y

Gaussian process

Page 24: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

👍Excellent.

Page 25: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

But: we don't know .

* we need to fit for it.

*

Page 26: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

3

The math of Gaussian processes

Page 27: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

Rasmussen & Williams gaussianprocess.org/gpml

Page 28: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

log p({yn} | ✓, ↵) = �1

2

r✓T K↵

�1 r✓ �1

2

log detK↵ � N

2

log(2⇡)

parameters of mean model

parameters of covariance model

residual vector

covariance matrix

Page 29: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

log p({yn} | ✓, ↵) = �1

2

r✓T K↵

�1 r✓ �1

2

log detK↵ � N

2

log(2⇡)

parameters of mean model

parameters of covariance model

residual vector

covariance matrix

This is the equation for an N-dimensional Gaussian** hint: this is where the name comes from…

Page 30: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

covariance matrix

mean model

generative model

This is the equation for an N-dimensional Gaussian** hint: this is where the name comes from…

y ⇠ N (m✓, K↵)

Page 31: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

[K↵]nm = �n2 �nm + k↵(xn, xm)

pixel n

pixel m

Page 32: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

[K↵]nm = �n2 �nm + k↵(xn, xm)

Page 33: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

[K↵]nm = �n2 �nm + k↵(xn, xm)

Page 34: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

[K↵]nm = �n2 �nm + k↵(xn, xm)

Page 35: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

[K↵]nm = �n2 �nm + k↵(xn, xm)

the "kernel" function

k↵(xn, xm) = a

2exp

✓� (xn � xm)

2

2 ⌧

2

◆for example*:

* Note: this part has nothing to do with the name Gaussian process

Page 36: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

�2

0

2

samples

0 2 4 6 8 10x , �x

0.0

0.5

1.0

kernel

Page 37: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

�2

0

2

samples

0 2 4 6 8 10x , �x

0.0

0.5

1.0

kernel

scale

Page 38: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

�2

0

2

samples

0 2 4 6 8 10x , �x

0.0

0.5

1.0

kernel

scale

amplitude

Page 39: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

�2

0

2

samples

0 2 4 6 8 10x , �x

0.0

0.5

1.0

kernel

Page 40: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

�2

0

2

samples

0 2 4 6 8 10x , �x

0.0

0.5

1.0

kernel

Page 41: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

�2

0

2

samples

0 2 4 6 8 10x , �x

0.0

0.5

1.0

kernel

Page 42: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

�2

0

2

samples

0 2 4 6 8 10x , �x

0.0

0.5

1.0

kernel

Page 43: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

�2

0

2

samples

0 2 4 6 8 10x , �x

0

2

4

kernel

Page 44: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

log p({yn} | ✓, ↵) = �1

2

r✓T K↵

�1 r✓ �1

2

log detK↵ � N

2

log(2⇡)

a drop-in replacement for χ2

Page 45: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

import numpy as np

def gp_log_like(params, x, y, yerr): K = params[0]**2 * np.exp(-0.5*(x[:, None]-x[None, :])**2/params[1]**2) K[np.diag_indices_from(K)] += yerr**2 ll = np.dot(y, np.linalg.solve(K, y)) ll += np.linalg.slogdet(K)[1] return -0.5*ll

A fully functional GP implementation in Python

+ scipy.optimize or emcee

Page 46: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

Using GPs in Python

1 george

2 scikit-learn

3 GPy

4 PyMC3

5 etc.

Page 47: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

Using GPs in Python

1 george

2 scikit-learn

3 GPy

4 PyMC3

5 etc.

Page 48: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

4

Why? The problems with Gaussian processes

Page 49: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

log p({yn} | ✓, ↵) = �1

2

r✓T K↵

�1 r✓ �1

2

log detK↵ � N

2

log(2⇡)

Page 50: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

log p({yn} | ✓, ↵) = �1

2

r✓T K↵

�1 r✓ �1

2

log detK↵ � N

2

log(2⇡)

a Choosing the kernel

Page 51: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

log p({yn} | ✓, ↵) = �1

2

r✓T K↵

�1 r✓ �1

2

log detK↵ � N

2

log(2⇡)

a Choosing the kernel

b Scaling to large datasets

Page 52: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

b Scaling to large datasets

Page 53: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

102 103 104

number of datapoints

10�4

10�3

10�2

10�1

100

compu

tation

alco

st[s]

experiment

O(N3)

Page 54: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

a Approximation

b Structure

Page 55: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

Approximation methods

i Subsample

ii Sparsity

iii Low-rank approximations (see HODLR solver in george)

iv etc.

Page 56: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

Structured models

i Kronecker products

ii Evenly sampled data

iii Semi-separable kernels (see celerite)

iv etc.

Page 57: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

celerite.readthedocs.io

102 103 104 105

number of data points [N]

10�5

10�4

10�3

10�2

10�1

100co

mpu

tationa

lco

st[sec

ond

s]

1

2

4

8

16

32

64

128

256

direct

O(N)

100 101 102

number of terms [J]

64

256

1024

4096

16384

65536

262144

O(J2)

Page 58: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

5

Recap

Page 59: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

log p({yn} | ✓, ↵) = �1

2

r✓T K↵

�1 r✓ �1

2

log detK↵ � N

2

log(2⇡)

if there is correlated noise (instrumental or astrophysical) in your data*, try a Gaussian process:

* Hint: there is!

to do this in Python, try:

import georgegeorge.readthedocs.io

Page 60: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

Resources

a gaussianprocess.org/gpml

b george.readthedocs.io

c dfm.io/gp.js

d github.com/dfm/gp

e [email protected]

Page 61: Gaussian Processes - Harvard Universityhea- · 2018. 1. 10. · BOMBCAT.GIFfit. What happened? 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. 5.0 2.5 0.0 2.5 5.0 x 1.0 0.5 0.0 0.5 y. datapoint

Gaussian Processesa practical introduction to

for astronomy

Dan Foreman-Mackey Flatiron Institute // dfm.io // github.com/dfm // @exoplaneteer