Lecture 12 Gaussian Process Models 10/16/2018 1 Multivariate - - PowerPoint PPT Presentation

โ–ถ
lecture 12
SMART_READER_LITE
LIVE PREVIEW

Lecture 12 Gaussian Process Models 10/16/2018 1 Multivariate - - PowerPoint PPT Presentation

Lecture 12 Gaussian Process Models 10/16/2018 1 Multivariate Normal Multivariate Normal Distribution 11 1 1 1 1 1 1


slide-1
SLIDE 1

Lecture 12

Gaussian Process Models

10/16/2018

1

slide-2
SLIDE 2

Multivariate Normal

slide-3
SLIDE 3

Multivariate Normal Distribution

For an ๐‘œ-dimension multivate normal distribution with covariance ๐šป (positive semidefinite) can be written as

๐™

๐‘œร—1 โˆผ ๐‘‚( ๐‚ ๐‘œร—1

, ๐šป

๐‘œร—๐‘œ) where {๐šป}๐‘—๐‘˜ = ๐œ2 ๐‘—๐‘˜ = ๐œ๐‘—๐‘˜ ๐œ๐‘— ๐œ๐‘˜

โŽ› โŽœ โŽ ๐‘1 โ‹ฎ ๐‘๐‘œ โŽž โŽŸ โŽ  โˆผ ๐‘‚ โŽ› โŽœ โŽ โŽ› โŽœ โŽ ๐œˆ1 โ‹ฎ ๐œˆ๐‘œ โŽž โŽŸ โŽ  , โŽ› โŽœ โŽ ๐œ11๐œ1๐œ1 โ‹ฏ ๐œ1๐‘œ๐œ1๐œ๐‘œ โ‹ฎ โ‹ฑ โ‹ฎ ๐œ๐‘œ1๐œ๐‘œ๐œ1 โ‹ฏ ๐œ๐‘œ๐‘œ๐œ๐‘œ๐œ๐‘œ โŽž โŽŸ โŽ  โŽž โŽŸ โŽ 

2

slide-4
SLIDE 4

Density

For the ๐‘œ dimensional multivate normal given on the last slide, its density is given by

(2๐œŒ)โˆ’๐‘œ/2 det(๐šป)โˆ’1/2 exp (โˆ’1 2(๐™ โˆ’ ๐‚)โ€ฒ

1ร—๐‘œ

๐šปโˆ’1

๐‘œร—๐‘œ(๐™ โˆ’ ๐‚) ๐‘œร—1

)

and its log density is given by

โˆ’๐‘œ 2 log 2๐œŒ โˆ’ 1 2 log det(๐šป) โˆ’ โˆ’1 2(๐™ โˆ’ ๐‚)โ€ฒ

1ร—๐‘œ

๐šปโˆ’1

๐‘œร—๐‘œ(๐™ โˆ’ ๐‚) ๐‘œร—1

3

slide-5
SLIDE 5

Sampling

To generate draws from an ๐‘œ-dimensional multivate normal with mean ๐‚ and covariance matrix ๐šป,

  • Find a matrix ๐ such that ๐šป = ๐ ๐๐‘ข, most often we use

๐ = Chol(๐šป) where ๐ is a lower triangular matrix.

  • Draw ๐‘œ iid unit normals (๐’ช(0, 1)) as ๐ด
  • Obtain multivariate normal draws using

๐™ = ๐‚ + ๐ ๐ด

4

slide-6
SLIDE 6

Sampling

To generate draws from an ๐‘œ-dimensional multivate normal with mean ๐‚ and covariance matrix ๐šป,

  • Find a matrix ๐ such that ๐šป = ๐ ๐๐‘ข, most often we use

๐ = Chol(๐šป) where ๐ is a lower triangular matrix.

  • Draw ๐‘œ iid unit normals (๐’ช(0, 1)) as ๐ด
  • Obtain multivariate normal draws using

๐™ = ๐‚ + ๐ ๐ด

4

slide-7
SLIDE 7

Sampling

To generate draws from an ๐‘œ-dimensional multivate normal with mean ๐‚ and covariance matrix ๐šป,

  • Find a matrix ๐ such that ๐šป = ๐ ๐๐‘ข, most often we use

๐ = Chol(๐šป) where ๐ is a lower triangular matrix.

  • Draw ๐‘œ iid unit normals (๐’ช(0, 1)) as ๐ด
  • Obtain multivariate normal draws using

๐™ = ๐‚ + ๐ ๐ด

4

slide-8
SLIDE 8

Sampling

To generate draws from an ๐‘œ-dimensional multivate normal with mean ๐‚ and covariance matrix ๐šป,

  • Find a matrix ๐ such that ๐šป = ๐ ๐๐‘ข, most often we use

๐ = Chol(๐šป) where ๐ is a lower triangular matrix.

  • Draw ๐‘œ iid unit normals (๐’ช(0, 1)) as ๐ด
  • Obtain multivariate normal draws using

๐™ = ๐‚ + ๐ ๐ด

4

slide-9
SLIDE 9

Bivariate Example

๐‚ = (0 0) ๐šป = (1 ๐œ ๐œ 1)

rho=โˆ’0.9 rho=โˆ’0.7 rho=โˆ’0.5 rho=โˆ’0.1 rho=0.9 rho=0.7 rho=0.5 rho=0.1 โˆ’2.5 0.0 2.5 โˆ’2.5 0.0 2.5 โˆ’2.5 0.0 2.5 โˆ’2.5 0.0 2.5 โˆ’4 โˆ’2 2 โˆ’4 โˆ’2 2

x y 5

slide-10
SLIDE 10

Marginal distributions

Proposition - For an ๐‘œ-dimensional multivate normal with mean ๐‚ and covariance matrix ๐šป, any marginal or conditional distribution of the ๐‘งโ€™s will also be (multivariate) normal. For a univariate marginal distribution,

๐‘ง๐‘— = ๐’ช(๐‚๐‘—, ๐šป๐‘—๐‘—)

For a bivariate marginal distribution,

๐ณ๐‘—๐‘˜ = ๐’ช ((๐‚๐‘— ๐‚๐‘˜ ) , (๐šป๐‘—๐‘— ๐šป๐‘—๐‘˜ ๐šป๐‘˜๐‘— ๐šป๐‘˜๐‘˜ ))

For a ๐‘™-dimensional marginal distribution,

๐ณ๐‘—,โ‹ฏ,๐‘™ = ๐’ช โŽ› โŽœ โŽ โŽ› โŽœ โŽ ๐‚๐‘— โ‹ฎ ๐‚๐‘™ โŽž โŽŸ โŽ  , โŽ› โŽœ โŽ ๐šป๐‘—๐‘— โ‹ฏ ๐šป๐‘—๐‘™ โ‹ฎ โ‹ฑ โ‹ฎ ๐šป๐‘™๐‘— โ‹ฏ ๐šป๐‘™๐‘™ โŽž โŽŸ โŽ  โŽž โŽŸ โŽ 

6

slide-11
SLIDE 11

Marginal distributions

Proposition - For an ๐‘œ-dimensional multivate normal with mean ๐‚ and covariance matrix ๐šป, any marginal or conditional distribution of the ๐‘งโ€™s will also be (multivariate) normal. For a univariate marginal distribution,

๐‘ง๐‘— = ๐’ช(๐‚๐‘—, ๐šป๐‘—๐‘—)

For a bivariate marginal distribution,

๐ณ๐‘—๐‘˜ = ๐’ช ((๐‚๐‘— ๐‚๐‘˜ ) , (๐šป๐‘—๐‘— ๐šป๐‘—๐‘˜ ๐šป๐‘˜๐‘— ๐šป๐‘˜๐‘˜ ))

For a ๐‘™-dimensional marginal distribution,

๐ณ๐‘—,โ‹ฏ,๐‘™ = ๐’ช โŽ› โŽœ โŽ โŽ› โŽœ โŽ ๐‚๐‘— โ‹ฎ ๐‚๐‘™ โŽž โŽŸ โŽ  , โŽ› โŽœ โŽ ๐šป๐‘—๐‘— โ‹ฏ ๐šป๐‘—๐‘™ โ‹ฎ โ‹ฑ โ‹ฎ ๐šป๐‘™๐‘— โ‹ฏ ๐šป๐‘™๐‘™ โŽž โŽŸ โŽ  โŽž โŽŸ โŽ 

6

slide-12
SLIDE 12

Marginal distributions

Proposition - For an ๐‘œ-dimensional multivate normal with mean ๐‚ and covariance matrix ๐šป, any marginal or conditional distribution of the ๐‘งโ€™s will also be (multivariate) normal. For a univariate marginal distribution,

๐‘ง๐‘— = ๐’ช(๐‚๐‘—, ๐šป๐‘—๐‘—)

For a bivariate marginal distribution,

๐ณ๐‘—๐‘˜ = ๐’ช ((๐‚๐‘— ๐‚๐‘˜ ) , (๐šป๐‘—๐‘— ๐šป๐‘—๐‘˜ ๐šป๐‘˜๐‘— ๐šป๐‘˜๐‘˜ ))

For a ๐‘™-dimensional marginal distribution,

๐ณ๐‘—,โ‹ฏ,๐‘™ = ๐’ช โŽ› โŽœ โŽ โŽ› โŽœ โŽ ๐‚๐‘— โ‹ฎ ๐‚๐‘™ โŽž โŽŸ โŽ  , โŽ› โŽœ โŽ ๐šป๐‘—๐‘— โ‹ฏ ๐šป๐‘—๐‘™ โ‹ฎ โ‹ฑ โ‹ฎ ๐šป๐‘™๐‘— โ‹ฏ ๐šป๐‘™๐‘™ โŽž โŽŸ โŽ  โŽž โŽŸ โŽ 

6

slide-13
SLIDE 13

Marginal distributions

Proposition - For an ๐‘œ-dimensional multivate normal with mean ๐‚ and covariance matrix ๐šป, any marginal or conditional distribution of the ๐‘งโ€™s will also be (multivariate) normal. For a univariate marginal distribution,

๐‘ง๐‘— = ๐’ช(๐‚๐‘—, ๐šป๐‘—๐‘—)

For a bivariate marginal distribution,

๐ณ๐‘—๐‘˜ = ๐’ช ((๐‚๐‘— ๐‚๐‘˜ ) , (๐šป๐‘—๐‘— ๐šป๐‘—๐‘˜ ๐šป๐‘˜๐‘— ๐šป๐‘˜๐‘˜ ))

For a ๐‘™-dimensional marginal distribution,

๐ณ๐‘—,โ‹ฏ,๐‘™ = ๐’ช โŽ› โŽœ โŽ โŽ› โŽœ โŽ ๐‚๐‘— โ‹ฎ ๐‚๐‘™ โŽž โŽŸ โŽ  , โŽ› โŽœ โŽ ๐šป๐‘—๐‘— โ‹ฏ ๐šป๐‘—๐‘™ โ‹ฎ โ‹ฑ โ‹ฎ ๐šป๐‘™๐‘— โ‹ฏ ๐šป๐‘™๐‘™ โŽž โŽŸ โŽ  โŽž โŽŸ โŽ 

6

slide-14
SLIDE 14

Conditional Distributions

If we partition the ๐‘œ-dimensions into two pieces such that

๐™ = (๐™1, ๐™2)๐‘ข then

๐™

๐‘œร—1 โˆผ ๐’ช โŽ›

โŽœ โŽœ โŽ (๐‚1 ๐‚2 )

๐‘œร—1

, (๐šป11 ๐šป12 ๐šป21 ๐šป22 )

๐‘œร—๐‘œ

โŽž โŽŸ โŽŸ โŽ  ๐™1

๐‘™ร—1

โˆผ ๐’ช( ๐‚1

๐‘™ร—1

, ๐šป11

๐‘™ร—๐‘™

) ๐™2

๐‘œโˆ’๐‘™ร—1

โˆผ ๐’ช( ๐‚2

๐‘œโˆ’๐‘™ร—1

, ๐šป22

๐‘œโˆ’๐‘™ร—๐‘œโˆ’๐‘™

) then the conditional distributions are given by ๐™๐Ÿ | ๐™2 = ๐› โˆผ ๐’ช(๐‚๐Ÿ + ๐šป๐Ÿ๐Ÿ‘ ๐šปโˆ’1

๐Ÿ‘๐Ÿ‘ (๐› โˆ’ ๐‚๐Ÿ‘), ๐šป๐Ÿ๐Ÿ โˆ’ ๐šป๐Ÿ๐Ÿ‘ ๐šปโˆ’1 ๐Ÿ‘๐Ÿ‘ ๐šป๐Ÿ‘๐Ÿ)

๐™๐Ÿ‘ | ๐™1 = ๐œ โˆผ ๐’ช(๐‚๐Ÿ‘ + ๐šป๐Ÿ‘๐Ÿ ๐šปโˆ’1

๐Ÿ๐Ÿ (๐œ โˆ’ ๐‚๐Ÿ), ๐šป๐Ÿ‘๐Ÿ‘ โˆ’ ๐šป๐Ÿ‘๐Ÿ ๐šปโˆ’1 ๐Ÿ๐Ÿ ๐šป๐Ÿ‘๐Ÿ)

7

slide-15
SLIDE 15

Conditional Distributions

If we partition the ๐‘œ-dimensions into two pieces such that

๐™ = (๐™1, ๐™2)๐‘ข then

๐™

๐‘œร—1 โˆผ ๐’ช โŽ›

โŽœ โŽœ โŽ (๐‚1 ๐‚2 )

๐‘œร—1

, (๐šป11 ๐šป12 ๐šป21 ๐šป22 )

๐‘œร—๐‘œ

โŽž โŽŸ โŽŸ โŽ  ๐™1

๐‘™ร—1

โˆผ ๐’ช( ๐‚1

๐‘™ร—1

, ๐šป11

๐‘™ร—๐‘™

) ๐™2

๐‘œโˆ’๐‘™ร—1

โˆผ ๐’ช( ๐‚2

๐‘œโˆ’๐‘™ร—1

, ๐šป22

๐‘œโˆ’๐‘™ร—๐‘œโˆ’๐‘™

) then the conditional distributions are given by ๐™๐Ÿ | ๐™2 = ๐› โˆผ ๐’ช(๐‚๐Ÿ + ๐šป๐Ÿ๐Ÿ‘ ๐šปโˆ’1

๐Ÿ‘๐Ÿ‘ (๐› โˆ’ ๐‚๐Ÿ‘), ๐šป๐Ÿ๐Ÿ โˆ’ ๐šป๐Ÿ๐Ÿ‘ ๐šปโˆ’1 ๐Ÿ‘๐Ÿ‘ ๐šป๐Ÿ‘๐Ÿ)

๐™๐Ÿ‘ | ๐™1 = ๐œ โˆผ ๐’ช(๐‚๐Ÿ‘ + ๐šป๐Ÿ‘๐Ÿ ๐šปโˆ’1

๐Ÿ๐Ÿ (๐œ โˆ’ ๐‚๐Ÿ), ๐šป๐Ÿ‘๐Ÿ‘ โˆ’ ๐šป๐Ÿ‘๐Ÿ ๐šปโˆ’1 ๐Ÿ๐Ÿ ๐šป๐Ÿ‘๐Ÿ)

7

slide-16
SLIDE 16

Gaussian Processes

From Shumway, A process, ๐™ = {๐‘ (๐‘ข) โˆถ ๐‘ข โˆˆ ๐‘ˆ}, is said to be a Gaussian process if all possible finite dimensional vectors ๐ณ = (๐‘ง๐‘ข1, ๐‘ง๐‘ข2, ..., ๐‘ง๐‘ข๐‘œ)๐‘ข, for every collection of time points ๐‘ข1, ๐‘ข2, โ€ฆ , ๐‘ข๐‘œ, and every positive integer ๐‘œ, have a multivariate normal distribution. So far we have only looked at examples of time series where ๐‘ˆ is discete (and evenly spaces & contiguous), it turns out things get a lot more interesting when we explore the case where ๐‘ˆ is defined on a continuous space (e.g.

  • r some subset of

).

8

slide-17
SLIDE 17

Gaussian Processes

From Shumway, A process, ๐™ = {๐‘ (๐‘ข) โˆถ ๐‘ข โˆˆ ๐‘ˆ}, is said to be a Gaussian process if all possible finite dimensional vectors ๐ณ = (๐‘ง๐‘ข1, ๐‘ง๐‘ข2, ..., ๐‘ง๐‘ข๐‘œ)๐‘ข, for every collection of time points ๐‘ข1, ๐‘ข2, โ€ฆ , ๐‘ข๐‘œ, and every positive integer ๐‘œ, have a multivariate normal distribution. So far we have only looked at examples of time series where ๐‘ˆ is discete (and evenly spaces & contiguous), it turns out things get a lot more interesting when we explore the case where ๐‘ˆ is defined on a continuous space (e.g. R or some subset of R).

8

slide-18
SLIDE 18

Gaussian Process Regression

slide-19
SLIDE 19

Parameterizing a Gaussian Process

Imagine we have a Gaussian process defined such that

๐™ = {๐‘ (๐‘ข) โˆถ ๐‘ข โˆˆ [0, 1]},

  • We now have an uncountably infinite set of possible ๐‘ขโ€™s and ๐‘ (๐‘ข)s.
  • We will only have a (small) finite number of observations

๐‘ (๐‘ข1), โ€ฆ , ๐‘ (๐‘ข๐‘œ) with which to say something useful about this

infinite dimensional process.

  • The unconstrained covariance matrix for the observed data can have

up to ๐‘œ(๐‘œ + 1)/2 unique valuesโˆ—

  • Necessary to make some simplifying assumptions:
  • Stationarity
  • Simple parameterization of ฮฃ

9

slide-20
SLIDE 20

Parameterizing a Gaussian Process

Imagine we have a Gaussian process defined such that

๐™ = {๐‘ (๐‘ข) โˆถ ๐‘ข โˆˆ [0, 1]},

  • We now have an uncountably infinite set of possible ๐‘ขโ€™s and ๐‘ (๐‘ข)s.
  • We will only have a (small) finite number of observations

๐‘ (๐‘ข1), โ€ฆ , ๐‘ (๐‘ข๐‘œ) with which to say something useful about this

infinite dimensional process.

  • The unconstrained covariance matrix for the observed data can have

up to ๐‘œ(๐‘œ + 1)/2 unique valuesโˆ—

  • Necessary to make some simplifying assumptions:
  • Stationarity
  • Simple parameterization of ฮฃ

9

slide-21
SLIDE 21

Parameterizing a Gaussian Process

Imagine we have a Gaussian process defined such that

๐™ = {๐‘ (๐‘ข) โˆถ ๐‘ข โˆˆ [0, 1]},

  • We now have an uncountably infinite set of possible ๐‘ขโ€™s and ๐‘ (๐‘ข)s.
  • We will only have a (small) finite number of observations

๐‘ (๐‘ข1), โ€ฆ , ๐‘ (๐‘ข๐‘œ) with which to say something useful about this

infinite dimensional process.

  • The unconstrained covariance matrix for the observed data can have

up to ๐‘œ(๐‘œ + 1)/2 unique valuesโˆ—

  • Necessary to make some simplifying assumptions:
  • Stationarity
  • Simple parameterization of ฮฃ

9

slide-22
SLIDE 22

Parameterizing a Gaussian Process

Imagine we have a Gaussian process defined such that

๐™ = {๐‘ (๐‘ข) โˆถ ๐‘ข โˆˆ [0, 1]},

  • We now have an uncountably infinite set of possible ๐‘ขโ€™s and ๐‘ (๐‘ข)s.
  • We will only have a (small) finite number of observations

๐‘ (๐‘ข1), โ€ฆ , ๐‘ (๐‘ข๐‘œ) with which to say something useful about this

infinite dimensional process.

  • The unconstrained covariance matrix for the observed data can have

up to ๐‘œ(๐‘œ + 1)/2 unique valuesโˆ—

  • Necessary to make some simplifying assumptions:
  • Stationarity
  • Simple parameterization of ฮฃ

9

slide-23
SLIDE 23

Parameterizing a Gaussian Process

Imagine we have a Gaussian process defined such that

๐™ = {๐‘ (๐‘ข) โˆถ ๐‘ข โˆˆ [0, 1]},

  • We now have an uncountably infinite set of possible ๐‘ขโ€™s and ๐‘ (๐‘ข)s.
  • We will only have a (small) finite number of observations

๐‘ (๐‘ข1), โ€ฆ , ๐‘ (๐‘ข๐‘œ) with which to say something useful about this

infinite dimensional process.

  • The unconstrained covariance matrix for the observed data can have

up to ๐‘œ(๐‘œ + 1)/2 unique valuesโˆ—

  • Necessary to make some simplifying assumptions:
  • Stationarity
  • Simple parameterization of ฮฃ

9

slide-24
SLIDE 24

Covariance Functions

More on these next week, but for now some simple / common examples Exponential Covariance:

ฮฃ(๐‘ง๐‘ข, ๐‘ง๐‘ขโ€ฒ) = ๐œ2 exp ( โˆ’ |๐‘ข โˆ’ ๐‘ขโ€ฒ| ๐‘š )

Squared Exponential Covariance:

ฮฃ(๐‘ง๐‘ข, ๐‘ง๐‘ขโ€ฒ) = ๐œ2 exp ( โˆ’ (|๐‘ข โˆ’ ๐‘ขโ€ฒ| ๐‘š )2)

Powered Exponential Covariance (๐‘ž โˆˆ (0, 2]):

ฮฃ(๐‘ง๐‘ข, ๐‘ง๐‘ขโ€ฒ) = ๐œ2 exp ( โˆ’ (|๐‘ข โˆ’ ๐‘ขโ€ฒ| ๐‘š )๐‘ž)

10

slide-25
SLIDE 25

Covariance Functions

More on these next week, but for now some simple / common examples Exponential Covariance:

ฮฃ(๐‘ง๐‘ข, ๐‘ง๐‘ขโ€ฒ) = ๐œ2 exp ( โˆ’ |๐‘ข โˆ’ ๐‘ขโ€ฒ| ๐‘š )

Squared Exponential Covariance:

ฮฃ(๐‘ง๐‘ข, ๐‘ง๐‘ขโ€ฒ) = ๐œ2 exp ( โˆ’ (|๐‘ข โˆ’ ๐‘ขโ€ฒ| ๐‘š )2)

Powered Exponential Covariance (๐‘ž โˆˆ (0, 2]):

ฮฃ(๐‘ง๐‘ข, ๐‘ง๐‘ขโ€ฒ) = ๐œ2 exp ( โˆ’ (|๐‘ข โˆ’ ๐‘ขโ€ฒ| ๐‘š )๐‘ž)

10

slide-26
SLIDE 26

Covariance Functions

More on these next week, but for now some simple / common examples Exponential Covariance:

ฮฃ(๐‘ง๐‘ข, ๐‘ง๐‘ขโ€ฒ) = ๐œ2 exp ( โˆ’ |๐‘ข โˆ’ ๐‘ขโ€ฒ| ๐‘š )

Squared Exponential Covariance:

ฮฃ(๐‘ง๐‘ข, ๐‘ง๐‘ขโ€ฒ) = ๐œ2 exp ( โˆ’ (|๐‘ข โˆ’ ๐‘ขโ€ฒ| ๐‘š )2)

Powered Exponential Covariance (๐‘ž โˆˆ (0, 2]):

ฮฃ(๐‘ง๐‘ข, ๐‘ง๐‘ขโ€ฒ) = ๐œ2 exp ( โˆ’ (|๐‘ข โˆ’ ๐‘ขโ€ฒ| ๐‘š )๐‘ž)

10

slide-27
SLIDE 27

Covariance Functions

More on these next week, but for now some simple / common examples Exponential Covariance:

ฮฃ(๐‘ง๐‘ข, ๐‘ง๐‘ขโ€ฒ) = ๐œ2 exp ( โˆ’ |๐‘ข โˆ’ ๐‘ขโ€ฒ| ๐‘š )

Squared Exponential Covariance:

ฮฃ(๐‘ง๐‘ข, ๐‘ง๐‘ขโ€ฒ) = ๐œ2 exp ( โˆ’ (|๐‘ข โˆ’ ๐‘ขโ€ฒ| ๐‘š )2)

Powered Exponential Covariance (๐‘ž โˆˆ (0, 2]):

ฮฃ(๐‘ง๐‘ข, ๐‘ง๐‘ขโ€ฒ) = ๐œ2 exp ( โˆ’ (|๐‘ข โˆ’ ๐‘ขโ€ฒ| ๐‘š )๐‘ž)

10

slide-28
SLIDE 28

Covariance Function - Correlation Decay

exp cov sq exp cov 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00

d corr l

1 2 3 4 5 6 7 8 9 10

11

slide-29
SLIDE 29

Correlation Decay - AR(1)

Recall that for a stationary AR(1) process:

๐›ฟ(โ„Ž) = ๐œ2

๐‘ฅ๐œš|โ„Ž| and ๐œ(โ„Ž) = ๐œš|โ„Ž|

therefore we can draw a somewhat similar picture about the decay of ๐œ as a function of distance.

0.25 0.50 0.75 1.00

rho phi

0.1 0.3 0.5 0.7 0.9

12

slide-30
SLIDE 30

Example

โˆ’2 โˆ’1 1 0.00 0.25 0.50 0.75 1.00

t y 13

slide-31
SLIDE 31

Prediction

Our example has 15 observations which we would like to use as the basis for predicting ๐‘ (๐‘ข) at other values of ๐‘ข (say a sequence of values from 0 to 1). For now lets use a square exponential covariance with ๐œ2 = 10 and ๐‘š = 5 We therefore want to sample from ๐™๐‘ž๐‘ ๐‘“๐‘’|๐™๐‘๐‘๐‘ก.

๐™๐‘ž๐‘ ๐‘“๐‘’ | ๐™๐‘๐‘๐‘ก = ๐ณ โˆผ ๐’ช(๐šป๐‘ž๐‘ ๐šปโˆ’1

๐‘๐‘๐‘ก ๐ณ, ๐šป๐ช๐ฌ๐Ÿ๐ž โˆ’ ๐šป๐‘ž๐‘ ๐šปโˆ’1 ๐‘ž๐‘ ๐‘“๐‘’ ๐šป๐‘๐‘ž)

14

slide-32
SLIDE 32

Prediction

Our example has 15 observations which we would like to use as the basis for predicting ๐‘ (๐‘ข) at other values of ๐‘ข (say a sequence of values from 0 to 1). For now lets use a square exponential covariance with ๐œ2 = 10 and ๐‘š = 5 We therefore want to sample from ๐™๐‘ž๐‘ ๐‘“๐‘’|๐™๐‘๐‘๐‘ก.

๐™๐‘ž๐‘ ๐‘“๐‘’ | ๐™๐‘๐‘๐‘ก = ๐ณ โˆผ ๐’ช(๐šป๐‘ž๐‘ ๐šปโˆ’1

๐‘๐‘๐‘ก ๐ณ, ๐šป๐ช๐ฌ๐Ÿ๐ž โˆ’ ๐šป๐‘ž๐‘ ๐šปโˆ’1 ๐‘ž๐‘ ๐‘“๐‘’ ๐šป๐‘๐‘ž)

14

slide-33
SLIDE 33

Prediction

Our example has 15 observations which we would like to use as the basis for predicting ๐‘ (๐‘ข) at other values of ๐‘ข (say a sequence of values from 0 to 1). For now lets use a square exponential covariance with ๐œ2 = 10 and ๐‘š = 5 We therefore want to sample from ๐™๐‘ž๐‘ ๐‘“๐‘’|๐™๐‘๐‘๐‘ก.

๐™๐‘ž๐‘ ๐‘“๐‘’ | ๐™๐‘๐‘๐‘ก = ๐ณ โˆผ ๐’ช(๐šป๐‘ž๐‘ ๐šปโˆ’1

๐‘๐‘๐‘ก ๐ณ, ๐šป๐ช๐ฌ๐Ÿ๐ž โˆ’ ๐šป๐‘ž๐‘ ๐šปโˆ’1 ๐‘ž๐‘ ๐‘“๐‘’ ๐šป๐‘๐‘ž)

14

slide-34
SLIDE 34

Draw 1

โˆ’4 โˆ’2 0.00 0.25 0.50 0.75 1.00

t y 15

slide-35
SLIDE 35

Draw 2

โˆ’4 โˆ’2 0.00 0.25 0.50 0.75 1.00

t y 16

slide-36
SLIDE 36

Draw 3

โˆ’4 โˆ’2 2 0.00 0.25 0.50 0.75 1.00

t y 17

slide-37
SLIDE 37

Draw 4

โˆ’4 โˆ’2 2 0.00 0.25 0.50 0.75 1.00

t y 18

slide-38
SLIDE 38

Draw 5

โˆ’4 โˆ’2 2 0.00 0.25 0.50 0.75 1.00

t y 19

slide-39
SLIDE 39

Many draws later

โˆ’5.0 โˆ’2.5 0.0 2.5 5.0 0.00 0.25 0.50 0.75 1.00

t y 20

slide-40
SLIDE 40

Exponential Covariance

โˆ’7.5 โˆ’5.0 โˆ’2.5 0.0 2.5 5.0 0.00 0.25 0.50 0.75 1.00

t y 21

slide-41
SLIDE 41

Exponential Covariance - Draw 2

โˆ’7.5 โˆ’5.0 โˆ’2.5 0.0 2.5 5.0 0.00 0.25 0.50 0.75 1.00

t y 22

slide-42
SLIDE 42

Exponential Covariance - Draw 3

โˆ’4 4 0.00 0.25 0.50 0.75 1.00

t y 23

slide-43
SLIDE 43

Exponential Covariance - Posterior

โˆ’5.0 โˆ’2.5 0.0 2.5 5.0 0.00 0.25 0.50 0.75 1.00

t y 24

slide-44
SLIDE 44

Powered Exponential Covariance (๐‘ž = 1.5)

โˆ’6 โˆ’3 3 6 0.00 0.25 0.50 0.75 1.00

t y 25

slide-45
SLIDE 45

Back to the square exponential

โˆ’5.0 โˆ’2.5 0.0 2.5 5.0 0.00 0.25 0.50 0.75 1.00

t y 26

slide-46
SLIDE 46

Changing the range (๐‘š)

Sq Exp Cov โˆ’ sigma2=10, l=15 Sq Exp Cov โˆ’ sigma2=10, l=20 Sq Exp Cov โˆ’ sigma2=10, l=5 Sq Exp Cov โˆ’ sigma2=10, l=10 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 โˆ’5 5 โˆ’5 5

t y 27

slide-47
SLIDE 47

Effective Range

For the square exponential covariance

๐ท๐‘๐‘ค(๐‘’) = ๐œ2 exp (โˆ’(๐‘š โ‹… ๐‘’)2) ๐ท๐‘๐‘ ๐‘ (๐‘’) = exp (โˆ’(๐‘š โ‹… ๐‘’)2)

we would like to know, for a given value of ๐‘š, beyond what distance apart must observations be to have a correlation less than 0.05?

28

slide-48
SLIDE 48

Changing the scale (๐œ2)

Sq Exp Cov โˆ’ sigma2=5, l=20 Sq Exp Cov โˆ’ sigma2=15, l=20 Sq Exp Cov โˆ’ sigma2=5, l=15 Sq Exp Cov โˆ’ sigma2=15, l=15 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 โˆ’5 5 โˆ’5 5

t y 29

slide-49
SLIDE 49

Fitting

gp_sq_exp_model = โ€model{ y ~ dmnorm(mu, inverse(Sigma)) for (i in 1:N) { mu[i] <- 0 } for (i in 1:(N-1)) { for (j in (i+1):N) { Sigma[i,j] <- sigma2 * exp(- pow(l*d[i,j],2)) Sigma[j,i] <- Sigma[i,j] } } for (k in 1:N) { Sigma[k,k] <- sigma2 + 0.00001 } sigma2 ~ dlnorm(0, 1.5) l ~ dt(0, 2.5, 1) T(0,) # Half-cauchy(0,2.5) }โ€

30

slide-50
SLIDE 50

Trace plots

l sigma2 250 500 750 1000 20 30 40 50 60 1 2 3 4

.iteration estimate term

l sigma2

param post_mean post_med post_lower post_upper l 30.20 28.70 20.63 51.51 sigma2 1.44 1.33 0.72 2.78

31

slide-51
SLIDE 51

Fitted models

โˆ’2 2 0.00 0.25 0.50 0.75 1.00

t y

Post Mean Model

32

slide-52
SLIDE 52

Forcasting

โˆ’3 โˆ’2 โˆ’1 1 2 0.0 0.5 1.0 1.5

t y

Post Mean Model

33

slide-53
SLIDE 53

Improving the model

gp_sq_exp_model2 = โ€model{ y ~ dmnorm(mu, inverse(Sigma)) for (i in 1:N) { mu[i] <- 0 } for (i in 1:(N-1)) { for (j in (i+1):N) { Sigma[i,j] <- sigma2 * exp(- pow(l*d[i,j],2)) Sigma[j,i] <- Sigma[i,j] } } for (k in 1:N) { Sigma[k,k] <- sigma2 + nugget } sigma2 ~ dlnorm(0, 1.5) l ~ dt(0, 2.5, 1) T(0,) # Half-cauchy(0,2.5) nugget ~ dlnorm(0, 1) }โ€

34

slide-54
SLIDE 54

Trace plots

l nugget sigma2 250 500 750 1000 5 10 15 20 0.0 0.5 1.0 2 4 6 8

.iteration estimate term

l nugget sigma2

param post_mean post_med post_lower post_upper l 7.01 6.75 2.17 11.79 nugget 0.13 0.09 0.03 0.57 sigma2 1.73 1.53 0.64 4.04

35

slide-55
SLIDE 55

Fitted models

Post Mean Model 0.00 0.25 0.50 0.75 1.00 โˆ’3 โˆ’2 โˆ’1 1

t y 36

slide-56
SLIDE 56

Forcasting

Post Mean Model 0.0 0.5 1.0 1.5 โˆ’3 โˆ’2 โˆ’1 1 2 3

t y 37