Sampling and parameter fitting with Hawkes Processes HUMANCENTERED

  • Slides: 20
Download presentation
Sampling and parameter fitting with Hawkes Processes HUMAN-CENTERED MACHINE LEARNING http: //courses. mpi-sws. org/hcml-ws

Sampling and parameter fitting with Hawkes Processes HUMAN-CENTERED MACHINE LEARNING http: //courses. mpi-sws. org/hcml-ws 18/

Recap: How to fit and why sample? Raw Data Infer parameters (Learning) Ø Parametrize

Recap: How to fit and why sample? Raw Data Infer parameters (Learning) Ø Parametrize intensity Sampling (Predicting) Ø Event times drawn from: Ø Derive Log-likelihood: Ø Helps with: o Prediction Ø Maximum likelihood estimation: o Model Checking o Sanity check o Gaining Intuition o Simulator o Summary statistics We will first sample and then fit. 2

Recap: What are Hawkes processes? time History, Intensity of self-exciting (or Hawkes) process: Observations:

Recap: What are Hawkes processes? time History, Intensity of self-exciting (or Hawkes) process: Observations: 1. Clustered (or bursty) occurrence of events 2. Intensity is stochastic and history dependent 3

Recap: How to fit a Hawkes process? time CV X! (u se The max.

Recap: How to fit a Hawkes process? time CV X! (u se The max. likelihood is jointly convex in and ) Maximum likelihood

Recap: How to sample from a Hawkes process time Thinning procedure (similar to rejection

Recap: How to sample from a Hawkes process time Thinning procedure (similar to rejection sampling): 1. Sample from Poisson process with intensity Inversion sampling 2. Generate 3. Keep the sample if Keep sample with prob. 5

Coding assignment overview Parameter fitting (Assignment 2) Sampler (Assignment 1) Sanity check (provided) 6

Coding assignment overview Parameter fitting (Assignment 2) Sampler (Assignment 1) Sanity check (provided) 6

Sampling: Ogata’s algorithm Ogata’s method of thinning Drawing 1 sample with intensity Accepting it

Sampling: Ogata’s algorithm Ogata’s method of thinning Drawing 1 sample with intensity Accepting it with prob 7

Sampling: Achtung I Ogata’s method of thinning Careful about exploding intensities! Ø Include a

Sampling: Achtung I Ogata’s method of thinning Careful about exploding intensities! Ø Include a check on i. Ø Ensure 8

Sampling: Achtung II Ogata’s method of thinning History up to but not including t.

Sampling: Achtung II Ogata’s method of thinning History up to but not including t. 9

Sampling: Achtung III Ogata’s method of thinning is not an actual sample! 10

Sampling: Achtung III Ogata’s method of thinning is not an actual sample! 10

Sampling: Evaluation python plot_hawkes. py 1. 0 0. 5 1. 0 10 sampled-sequences. txt

Sampling: Evaluation python plot_hawkes. py 1. 0 0. 5 1. 0 10 sampled-sequences. txt output-plot. png Theoretical value Empirical average Juxtaposed events from sequences 11

Sampling: Evaluation python plot_hawkes. py 1. 0 0. 5 1. 0 10 sampled-sequences. txt

Sampling: Evaluation python plot_hawkes. py 1. 0 0. 5 1. 0 10 sampled-sequences. txt output-plot. png Theoretical value Empirical average Poisson (incorrect) sampler Juxtaposed events from sequences 12

Sampling: Evaluation python plot_hawkes. py 1. 0 0. 5 1. 0 10 sampled-sequences. txt

Sampling: Evaluation python plot_hawkes. py 1. 0 0. 5 1. 0 10 sampled-sequences. txt output-plot. png Theoretical value Empirical average Deterministic (incorrect) sampler Juxtaposed events from sequences 13

Live coding Ø Show baseline + sanity check Ø Show Poisson + sanity check

Live coding Ø Show baseline + sanity check Ø Show Poisson + sanity check 14

Parameter fitting: Problem setting Sampler (Assignment 1) samples. txt Parameter fitting (Assignment 2) samples-test.

Parameter fitting: Problem setting Sampler (Assignment 1) samples. txt Parameter fitting (Assignment 2) samples-test. txt 15

Parameter fitting: Method Maximum likelihood estimation: Nested sum Can we do it faster for

Parameter fitting: Method Maximum likelihood estimation: Nested sum Can we do it faster for exponential kernels? 16

Parameter fitting: Using cvxpy 17

Parameter fitting: Using cvxpy 17

Parameter fitting: Using cvxpy Change this to maximize the likelihood 18

Parameter fitting: Using cvxpy Change this to maximize the likelihood 18

Live coding Ø Show baseline + desired output Ø Evaluation via sampling 19

Live coding Ø Show baseline + desired output Ø Evaluation via sampling 19

Happy coding and holidays! Questions? Ø Drop me an e-mail at utkarshu@mpi-sws. org Ø

Happy coding and holidays! Questions? Ø Drop me an e-mail at utkarshu@mpi-sws. org Ø Skype: utkarsh. upadhyay 20