Automa;c Rules Genera;on for CEP G. Cugola E. Della - - PowerPoint PPT Presentation

automa c rules genera on for cep
SMART_READER_LITE
LIVE PREVIEW

Automa;c Rules Genera;on for CEP G. Cugola E. Della - - PowerPoint PPT Presentation

Stream and Complex Event Processing Learning From the Past Automa;c Rules Genera;on for CEP G. Cugola E. Della Valle A. Margara


slide-1
SLIDE 1

Stream ¡and ¡Complex ¡Event ¡Processing ¡

Learning ¡From ¡the ¡Past ¡ Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡

  • G. ¡Cugola ¡ ¡ ¡ ¡E. ¡Della ¡Valle ¡

¡ ¡ ¡A. ¡Margara ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡Politecnico ¡di ¡Milano ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Vrije ¡Universiteit ¡Amsterdam ¡

cugola@elet.polimi.it a.margara@vu.nl dellavalle@elet.polimi.it

slide-2
SLIDE 2

Complex ¡Event ¡Processing ¡(CEP) ¡

Complex ¡Event ¡ Processing ¡

sources ¡ sinks ¡ rules ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 2 ¡

slide-3
SLIDE 3

Idea ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 3 ¡

slide-4
SLIDE 4

Outline ¡

  • Model ¡
  • Prototype ¡implementa;on ¡
  • Based ¡on ¡machine ¡learning ¡
  • Ini;al ¡results ¡and ¡valida;on ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 4 ¡

slide-5
SLIDE 5

Event ¡Model ¡

Temperature ¡@10 ¡ ¡ (room=123, ¡value=24.5) ¡

S() ¡ S() ¡ T(50) ¡ T(28) ¡ T(27.5) ¡ T(25) ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 5 ¡

slide-6
SLIDE 6

Rule ¡Languages ¡

Oracle ¡CEP ¡ MicrosoY ¡ Stream ¡Insight ¡ Stream ¡ Cayuga ¡ IBM ¡WSBE ¡ Stream ¡Mill ¡ Aurora ¡ Borealis ¡ SASE+ ¡ Padres ¡ Esper ¡ Telegraph ¡ CQ ¡ NextCEP ¡ TESLA ¡ ETALIS ¡ TIBCO ¡Business ¡ Events ¡ Progress ¡ Apama ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 6 ¡

slide-7
SLIDE 7

CEP ¡Operators ¡

Define ¡ ¡ ¡FIRE: ¡ within ¡5 ¡min ¡ { ¡Smoke() ¡and ¡Temp(value>40) ¡and ¡not ¡Rain ¡(mm>2) ¡} ¡ where ¡{ ¡Temp ¡-­‑> ¡Smoke ¡} ¡

Selec;on ¡ Combina;on ¡ Nega;on ¡ Sequence ¡ Window ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 7 ¡

slide-8
SLIDE 8

iCEP ¡

Produces { Events/Attributes }

Events and Attributes Learner

Requires { } Optional { Size of Window } Produces { Size of Window }

Window Learner

Requires { } Optional { Relevant Events/Attributes } Produces { Predicates }

Predicates Learner

Requires { Events/Attributes, Size of Window } Optional { } Produces { Negations }

Negations Learner

Requires { Predicates, Size of Window } Optional { } Produces { Sequences }

Sequences Learner

Requires { Predicates, Size of Window } Optional { }

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 8 ¡

slide-9
SLIDE 9

Machine ¡Learning ¡

Var1 ¡= ¡25; ¡Var2 ¡= ¡True; ¡…….; ¡Occurred ¡= ¡YES ¡ Var1 ¡= ¡35; ¡Var2 ¡= ¡True; ¡…….; ¡Occurred ¡= ¡YES ¡ Var1 ¡= ¡12; ¡Var2 ¡= ¡False; ¡…….; ¡Occurred ¡= ¡NO ¡ Var1 ¡= ¡25; ¡Var2 ¡= ¡False; ¡…….; ¡Occurred ¡= ¡NO ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 9 ¡

slide-10
SLIDE 10

iCEP ¡

Produces { Events/Attributes }

Events and Attributes Learner

Requires { } Optional { Size of Window } Produces { Size of Window }

Window Learner

Requires { } Optional { Relevant Events/Attributes } Produces { Predicates }

Predicates Learner

Requires { Events/Attributes, Size of Window } Optional { } Produces { Negations }

Negations Learner

Requires { Predicates, Size of Window } Optional { } Produces { Sequences }

Sequences Learner

Requires { Predicates, Size of Window } Optional { }

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 10 ¡

slide-11
SLIDE 11

Events ¡and ¡Alributes ¡Learner ¡

CE B A C D win A = no; B = no; C = yes; D = yes; Occurred = no A = yes; B = yes; C = no; D = no; Occurred = yes C B D D

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 11 ¡

slide-12
SLIDE 12

iCEP ¡

Produces { Events/Attributes }

Events and Attributes Learner

Requires { } Optional { Size of Window } Produces { Size of Window }

Window Learner

Requires { } Optional { Relevant Events/Attributes } Produces { Predicates }

Predicates Learner

Requires { Events/Attributes, Size of Window } Optional { } Produces { Negations }

Negations Learner

Requires { Predicates, Size of Window } Optional { } Produces { Sequences }

Sequences Learner

Requires { Predicates, Size of Window } Optional { }

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 12 ¡

slide-13
SLIDE 13

Window ¡Learner ¡

CE B A C D win A = no; B = no; C = yes; D = yes; Occurred = no A = yes; B = yes; C = no; D = no; Occurred = yes C B D D

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 13 ¡

slide-14
SLIDE 14

iCEP ¡

Produces { Events/Attributes }

Events and Attributes Learner

Requires { } Optional { Size of Window } Produces { Size of Window }

Window Learner

Requires { } Optional { Relevant Events/Attributes } Produces { Predicates }

Predicates Learner

Requires { Events/Attributes, Size of Window } Optional { } Produces { Negations }

Negations Learner

Requires { Predicates, Size of Window } Optional { } Produces { Sequences }

Sequences Learner

Requires { Predicates, Size of Window } Optional { }

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 14 ¡

slide-15
SLIDE 15

Predicates ¡Learner ¡

va

no

va va

yes

≤10

>10

≤12

>12 (va > 10 and va ≤ 12) or (va > 20) yes

no

≤20

>20

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 15 ¡

slide-16
SLIDE 16

iCEP ¡

Produces { Events/Attributes }

Events and Attributes Learner

Requires { } Optional { Size of Window } Produces { Size of Window }

Window Learner

Requires { } Optional { Relevant Events/Attributes } Produces { Predicates }

Predicates Learner

Requires { Events/Attributes, Size of Window } Optional { } Produces { Negations }

Negations Learner

Requires { Predicates, Size of Window } Optional { } Produces { Sequences }

Sequences Learner

Requires { Predicates, Size of Window } Optional { }

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 16 ¡

slide-17
SLIDE 17

Sequences ¡Learner ¡

  • For ¡each ¡occurrence ¡of ¡CE ¡
  • For ¡each ¡couple ¡of ¡events ¡e1 ¡and ¡e2 ¡
  • Count ¡Freq ¡(e1 ¡à ¡e2) ¡
  • Count ¡Freq ¡(e2 ¡à ¡e1) ¡
  • Seq(e1, ¡e2) ¡iff ¡
  • Freq ¡(e1 ¡à ¡e2) ¡≃ ¡1 ¡
  • Freq ¡(e1 ¡à ¡e2) ¡>> ¡Freq ¡(e2 ¡à ¡e1) ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 17 ¡

slide-18
SLIDE 18

iCEP ¡

Produces { Events/Attributes }

Events and Attributes Learner

Requires { } Optional { Size of Window } Produces { Size of Window }

Window Learner

Requires { } Optional { Relevant Events/Attributes } Produces { Predicates }

Predicates Learner

Requires { Events/Attributes, Size of Window } Optional { } Produces { Negations }

Negations Learner

Requires { Predicates, Size of Window } Optional { } Produces { Sequences }

Sequences Learner

Requires { Predicates, Size of Window } Optional { }

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 18 ¡

slide-19
SLIDE 19

Nega;ons ¡Learner ¡

  • For ¡each ¡occurrence ¡of ¡CE ¡
  • For ¡each ¡relevant ¡event ¡e ¡
  • Count ¡the ¡Freq ¡(e) ¡
  • Neg ¡(e) ¡iff ¡
  • Freq ¡(e) ¡≃ ¡0 ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 19 ¡

slide-20
SLIDE 20

Evalua;on ¡

Generate training history of primitive events Detect all composite events in training history Generate Rule R Execute iCEP to infer Rule R* Generate evaluation history

  • f primitive events

Detect all composite events in evaluation history using R Detect all composite events in evaluation history using R* Compare rules syntactically Compare rules to determine recall and precision Split training history in positive and negative traces

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 20 ¡

slide-21
SLIDE 21

Evalua;on ¡

Number ¡of ¡Event ¡Types ¡ 25 ¡ Distribu;on ¡of ¡Types ¡ Uniform ¡ Number ¡of ¡Alributes ¡per ¡Event ¡ 1 ¡ Number ¡of ¡Values ¡per ¡Alribute ¡ 100 ¡ Number ¡of ¡Sequences ¡ 1 ¡ Length ¡of ¡Sequences ¡ 3 ¡ Average ¡Window ¡Size ¡ 10 ¡ Number ¡of ¡Nega;ons ¡ 0 ¡ Recall ¡ Precision ¡ Type ¡ Win ¡ Pred ¡ Seq ¡ Neg ¡ 0.99 ¡ 0.94 ¡ 0.1 ¡ 3.6 ¡ 0.03 ¡ 0.2 ¡ 0.0 ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 21 ¡

slide-22
SLIDE 22

Number ¡of ¡Events ¡

W/ ¡Sequence ¡

0.2 0.4 0.6 0.8 1 1 2 3 4 5 Number of Primitive Events Recall Precision

W/O ¡Sequence ¡

0.2 0.4 0.6 0.8 1 1 2 3 4 5 Number of Primitive Events Recall Precision

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 22 ¡

slide-23
SLIDE 23

Window ¡Size ¡

0.2 0.4 0.6 0.8 1 10 20 30 40 50 60 70 Windows Size Recall Precision

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 23 ¡

slide-24
SLIDE 24

Number ¡of ¡Types ¡

0.2 0.4 0.6 0.8 1 10 20 30 40 50 60 70 80 90 100 Number of Event Types Recall Precision

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 24 ¡

slide-25
SLIDE 25

Number ¡of ¡Samples ¡

0.2 0.4 0.6 0.8 1 0.5 1 1.5 2 2.5 3 Number of Samples (k) Recall Precision

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 25 ¡

slide-26
SLIDE 26

Open ¡Ques;ons ¡

  • How ¡to ¡encode ¡mul;ple-­‑alributes? ¡
  • How ¡to ¡encode ¡parameters? ¡
  • Rela;ons ¡between ¡the ¡values ¡in ¡the ¡same ¡or ¡

different ¡events ¡

  • E.g. ¡Smoke ¡and ¡Temperature ¡must ¡share ¡the ¡same ¡

loca;on ¡

Stream ¡& ¡Complex ¡Event ¡Processing ¡-­‑ ¡Automa;c ¡Rules ¡Genera;on ¡for ¡CEP ¡ 26 ¡