MLSS 2016 Prac<cal Machine Learning for Networks - - PowerPoint PPT Presentation

mlss 2016 prac cal
SMART_READER_LITE
LIVE PREVIEW

MLSS 2016 Prac<cal Machine Learning for Networks - - PowerPoint PPT Presentation

MLSS 2016 Prac<cal Machine Learning for Networks Isabel Valera Utkarsh Upadhyay MPI for So)ware Systems MLSS 2016 C ADIZ GeEng ready 1. Install


slide-1
SLIDE 1

Isabel ¡Valera ¡ Utkarsh ¡Upadhyay ¡

MPI ¡for ¡So)ware ¡Systems ¡

MLSS ¡2016

¡

CADIZ

¡

MLSS ¡2016 ¡– ¡Prac<cal ¡

Machine ¡Learning ¡for ¡Networks ¡

¡

slide-2
SLIDE 2

2

GeEng ¡ready ¡

  • 1. ¡Install ¡CVX ¡for ¡MATLAB ¡/ ¡cvxpy ¡for ¡Python

¡

import ¡cvxpy ¡as ¡CVX ¡ x ¡= ¡CVX.Variable(n) ¡ constraints ¡= ¡[ ¡ ¡ ¡f(x) ¡<= ¡0, ¡ ¡ ¡A ¡* ¡x ¡– ¡b ¡== ¡0 ¡ ] ¡ prob ¡= ¡CVX.Problem( ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ CVX.Minimize(f0(x)), ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡constraints) ¡ prob.solve() ¡ http://cvxr.com/cvx/download/

slide-3
SLIDE 3

3

Outline ¡

Part ¡II ¡ Part ¡I ¡

Hawkes ¡Process ¡

[Aalen ¡et ¡al., ¡Springer ¡2008] ¡ ¡

NetRate ¡

[Gomez ¡Rodriguez ¡et ¡al., ¡ICML ¡ 2011] ¡

Point ¡Processes ¡è è ¡Simula<on ¡and ¡es<ma<on ¡

Informa<on ¡Diffusion ¡ ¡ Social ¡Ac<vity ¡

slide-4
SLIDE 4

4

Task ¡I ¡

NetRate ¡

Data ¡

[Gomez ¡Rodriguez ¡et ¡al., ¡ICML ¡2011] ¡

tj tk tl ti

. . .

Cascade ¡1 ¡ Cascade ¡N ¡ ti tl tj tk

Model ¡

? ¡

Es<ma<on ¡ Es<mate ¡transmission ¡rates ¡in ¡NetRate ¡model ¡with ¡ exponen<al ¡transmission ¡func<on. ¡

i j k l

¡αji ¡αlk ¡αli

slide-5
SLIDE 5

5

Task ¡I ¡

NetRate ¡

Data ¡

max{αji} ¡Σc ¡log ¡f({tj}c ¡; ¡{αji})

[Gomez ¡Rodriguez ¡et ¡al., ¡ICML ¡2011] ¡

tj tk tl ti

. . .

Cascade ¡1 ¡ Cascade ¡N ¡ ti tl tj tk

Model ¡

MLE ¡soluTon ¡

Es<ma<on ¡ Es<mate ¡transmission ¡rates ¡in ¡NetRate ¡model ¡with ¡ exponen<al ¡transmission ¡func<on. ¡

i j k l

¡αji ¡αlk ¡αli

slide-6
SLIDE 6

6

NetRate ¡

Data ¡

max{αji} ¡Σc ¡log ¡f({tj}c ¡; ¡{αji})

[Gomez ¡Rodriguez ¡et ¡al., ¡ICML ¡2011] ¡

tj tk tl ti

. . .

Cascade ¡1 ¡ Cascade ¡N ¡ ti tl tj tk

Model ¡

MLE ¡soluTon ¡

Es<ma<on ¡ Es<mate ¡transmission ¡rates ¡in ¡NetRate ¡model ¡with ¡ exponen<al ¡transmission ¡func<on. ¡

i j k l

¡αji ¡αlk ¡αli

Exercise ¡1 ¡

Task ¡I ¡

slide-7
SLIDE 7

7

The ¡likelihood ¡of ¡a ¡cascade ¡by ¡Tme ¡T ¡is: ¡ MLE ¡es<ma<on: ¡

Task ¡I ¡

slide-8
SLIDE 8

Task ¡I ¡

https://github.com/Networks-Learning/mlss-2016

slide-9
SLIDE 9

9

Part ¡II ¡ Part ¡I ¡

Hawkes ¡Process ¡

[Aalen ¡et ¡al., ¡Springer ¡2008] ¡ ¡

NetRate ¡

[Gomez ¡Rodriguez ¡et ¡al., ¡ICML ¡ 2011] ¡

Point ¡Processes ¡è è ¡Simula<on ¡and ¡es<ma<on ¡

Informa<on ¡Diffusion ¡ ¡ Social ¡Ac<vity ¡

OUTLINE ¡

slide-10
SLIDE 10

10

Ogata’s ¡algorithm ¡

Model ¡

[Gomez ¡Rodriguez ¡et ¡al., ¡ICML ¡2011] ¡

Simula<on ¡

MLE ¡soluTon ¡

Es<ma<on ¡ Generate ¡samples ¡from ¡a ¡(univariate) ¡Hawkes ¡Process ¡

max

α,λ0 L(t1, . . . , tn)

Hawkes ¡process ¡

kα(t) = αe−w(t−ti) λ0

¡ ¡ ¡ ¡= ¡Base ¡intensity ¡ t1 t2 t3 t4

λ(t) = λ0 + X

i:ti∈H(t)

kα(t − ti)

Task ¡II ¡

slide-11
SLIDE 11

11

Ogata’s ¡algorithm ¡

Model ¡

[Gomez ¡Rodriguez ¡et ¡al., ¡ICML ¡2011] ¡

Simula<on ¡

MLE ¡soluTon ¡

Es<ma<on ¡ Generate ¡samples ¡from ¡a ¡(univariate) ¡Hawkes ¡Process ¡

max

α,λ0 L(t1, . . . , tn)

Hawkes ¡process ¡

kα(t) = αe−w(t−ti) λ0

¡ ¡ ¡ ¡= ¡Base ¡intensity ¡ Exercise ¡2 ¡ t1 t2 t3 t4

λ(t) = λ0 + X

i:ti∈H(t)

kα(t − ti)

Task ¡II ¡

slide-12
SLIDE 12

12

Ogata’s ¡Algorithm: ¡

Task ¡II ¡

[Ogata, ¡1981] ¡

1: Input: λ0, α and T 2: Initialize: n 1, λ⇤ λ0 Generate first event: 3: Generate q ⇠ U[0,1] and s 1

λ⇤ ln(q)

4: if s > T, then go to last step. 5: else Set t1 s and n n + 1, General subroutine: 6: while s < T do 7: Update λ⇤ λ(tn1) + α 8: Generate q ⇠ U[0,1] and s tn1

1 λ⇤ ln(q)

9: if s > T, then go to last step 10: else Rejection Test: Sample d ⇠ U[0,1] if d  λ(s)

λ⇤ , then tn s and n n + 1

else update λ⇤ λ(s). end while 11: Output: Retrieve the events ({tn}) on [0, T]

slide-13
SLIDE 13

13

Ogata’s ¡Algorithm: ¡

Task ¡II ¡

[Ogata, ¡1981] ¡

1: Input: λ0, α and T 2: Initialize: n 1, λ⇤ λ0 Generate first event: 3: Generate q ⇠ U[0,1] and s 1

λ⇤ ln(q)

4: if s > T, then go to last step. 5: else Set t1 s and n n + 1, General subroutine: 6: while s < T do 7: Update λ⇤ λ(tn1) + α 8: Generate q ⇠ U[0,1] and s tn1

1 λ⇤ ln(q)

9: if s > T, then go to last step 10: else Rejection Test: Sample d ⇠ U[0,1] if d  λ(s)

λ⇤ , then tn s and n n + 1

else update λ⇤ λ(s). end while 11: Output: Retrieve the events ({tn}) on [0, T]

λ(t) = λ0 + X

i:ti∈H(t)

kα(t − ti)

History up to but not including t.

slide-14
SLIDE 14

14

Events ¡likelihood ¡ Condi<onal ¡ intensity ¡rate ¡

Maximum ¡likelihood ¡ approach ¡to ¡find ¡ ¡ model ¡parameters! ¡

[Farajtabar ¡et ¡al., ¡NIPS ¡2014] ¡

max

α,λ0 L(t1, . . . , tn)

Task ¡II ¡

slide-15
SLIDE 15

15

Downloads ¡

NetRate:

Paper: http://www.mpi-sws.org/~manuelgr/pubs/netrate-icml11.pdf Code: https://github.com/Networks-Learning/netrate

Hawkes ¡Process:

Slides: http://lamp.ecp.fr/MAS/fiQuant/ioane_files/HawkesCourseSlides.pdf Code: https://github.com/dunan/MultiVariatePointProcess

CVX:

Slides: http://web.stanford.edu/class/ee364a/lectures/cvx_tutorial.pdf Code: http://cvxr.com/cvx/download/