inferring definite-clause grammars to express multivariate time series gabriela guimarães and luís...
TRANSCRIPT
Inferring Definite-Clause Grammars Inferring Definite-Clause Grammars to Express Multivariate Time Seriesto Express Multivariate Time Series
Gabriela Guimarães and Luís Moniz Pereira
CENTRIA (Centre for Artificial Inteligence), UNL, Portugal
ContentContent
Introduction Introducing Abstraction Levels for
Temporal Pattern Recognition Temporal Grammatical Rules Definitive Clause Grammars An Application in Medicine Conclusions
IntroductionIntroduction
Rule Induction for multivariate time series– Usually, a set of strings defined on a specific alphabet
is used as the set of examples for the induction process. – For multivariate time series no sequence of strings
exists. This means that the time series has to be transformed into a string-based representation.
– This transformation may include the discovery of inherent patterns in time series using unsupervised methods, such as Self-organizing neural Networks [Kohonen 82].
Introducing Abstraction LevelsIntroducing Abstraction Levels
E
Sel
ectio
n
Sel
ectio
n
Sel
ectio
nFea
ture
Ext
ract
ion
SOM SOM SOM…PrimitivePatterns
Suc
cess
ions
E
Events
E
E
E
E
E
Seq
uenc
es
E
E
Tem
pora
l Pat
tern
s
...
...
...
Temporal Patternssimilar sequences with small variations of the events within the sequences
Sequencestipical sequences of events that occur more than once
Eventsmore or less simultaneously occurring successions at different primitive pattern-channels
Successionsimmediately succeding primitive patterns in timeat the same primitive pattern-channel
Primitive Patternselementary patterns or structures in selections of features obtained from the time series
Featurestransformation of all time series
Temporal Grammatical RulesTemporal Grammatical Rules
A Primitive pattern is a‘primitive_pattern_name’
if‘feature i’ [mini, maxi]
and‘feature j’ [minj, maxj]
and…and‘feature k’ [mink, maxk]
An event is a ‘event_name’
if
‘succession i1’ or … or ‘succession 1n’
is more or less simultaneous
‘succession j1’ or … or ‘succession jm’
is more or less simultaneous
…
is more or less simultaneous
‘succession k1’ or … or ‘succession kn’
A sequence is a ‘sequence_name’ [min, max]
if
‘Eventi’: ‘name of event i [mini, maxi]’
followed by [followed after [mintj, maxtj] by]
‘Eventj’: ‘name of event j [minj, maxj]’
…
followed by [followed after [mintl, maxtl] by]
‘Eventl’: ‘name of event l [minl, maxl]’
A temporal pattern is a
‘temporal_pattern_name’ [min, max]if
‘sequencei’ [mini, maxi]’or‘Sequencej’ [minj, maxj]’
or…or‘Sequencek’ [minv, maxv]’
Definitive Clause GrammarsDefinitive Clause Grammars– Idea:
Basically, DCGs are built up from cf-rules. In order to provide context-dependency, a DCG extends a cf-grammar by augmenting non-terminals with arguments.
– DCGs extend cf-grammars in three important ways: arbitrary tree structures that are built up in the course of parsing context-dependency in a grammar extra conditions
– Advantage of DCGs in dealing with context-dependency: efficient implementation of DCG-rules as logic statements by
definitive clauses or Horn clauses nonterminals are written as Prolog atoms and terminals as facts
An Application in MedicineAn Application in MedicineSleep Apnoea
– Sleep Disorder with high prevalence.– Identification of different types of
sleep disorders, apnoea and hypopnoeas.
– Quite different patterns may occur for the same disorder type, and even for the same patient.
– Strong variation of the duration.– For an automated classification, all
signals have to be analyzed simlutaneously.
– Usually a visual classification is made.
ResultsResults
All events and temporal patterns can describe the main properties of SRBDs, such as hyperpnoe, hypopnoea, obstructive snoring, obstructive apnoea
Altogether 15 Primitive Patterns, 6 Events, 6 Sequences and 4 Temporal Patterns were found.
Sensitivity of 0.762 and specificity of 0.758
Results for one Apnoea typeResults for one Apnoea type
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
04:0
0:00
04:0
0:05
04:0
0:10
04:0
0:14
04:0
0:19
04:0
0:24
04:0
0:28
04:0
0:33
04:0
0:38
04:0
0:43
04:0
0:48
04:0
0:52
04:0
0:58
04:0
1:02
04:0
1:07
04:0
1:12
04:0
1:16
04:0
1:21
04:0
1:26
04:0
1:31
04:0
1:36
04:0
1:40
04:0
1:45
04:0
1:50
04:0
1:55
04:0
2:00
04:0
2:04
04:0
2:09
04:0
2:14
04:0
2:19
04:0
2:24
04:0
2:28
04:0
2:33
04:0
2:38
04:0
2:43
04:0
2:48
04:0
2:53
04:0
2:58
04:0
3:02
04:0
3:07
04:0
3:12
04:0
3:16
04:0
3:21
04:0
3:26
04:0
3:31
04:0
3:36
04:0
3:40
04:0
3:46
04:0
3:50
04:0
3:55
04:0
4:00
Event2
Event3
Event5
Event Tace t
No ribcage and abdomina lmovements without snoringS trong ribcage and abdomina l movementsReduced ribcage and abdomina lmovements without snoringTace t
No a irflow without snoring
S trong a irflow with snoring
Tace t
Airflow
Ribcage movements
Abdomina l movements
S noring
Temporal Grammatical Rules for Temporal Grammatical Rules for Sleep ApnoeaSleep Apnoea
A primitive pattern is a ‘A2’‘no airflow without snoring’
if‘no airflow’ [0.951, 1]
and‘reduced airflow’ = 0
and‘snoring intensity’ [0, 0.241]
An event is a
‘Event3’: ‘strong breathing with snoring’if
(‘strong airflow with snoring’or
‘reduced airflow with snoring’or‘tacets’)
is more or less simultaneous‘strong ribcage and abdominal movements’
A sequence is a ‘Sequence1’ [40 sec, 64 sec] if
‘Event1’: ‘no airflow and no chest and abdomen wall movements without snoring’ [13 sec, 18 sec]
followed by
‘Event2’: ‘no airflow and reduced chest and no abdomen wall movements without snoring’ [20 sec, 39 sec]
followed after [0,5 sec, 5 sec] by ‘Event3’: ‘strong breathing with snoring’ [6 sec, 12 sec]
Implementation in PrologImplementation in PrologRules
succession(S,D) --> succ(S), op, duration(D), cp.…transition(T,D) --> trans(T), op, duration(D), cp.…succes(’E5’,D1) --> succession(’A4’,D) ; succession(’A1’,D) ; transition(T,D).succes(’E5’,D2) --> succession(’B6’,D).…event(’E5’,D) --> succes(’E5’,D1), simultaneity, succes(’E5’,D2),range(’E5’,LR,UR), {D is (D1+D2)/2, D<UR, D>LR}.…sequence(’S1’,D) --> event(’S1’,D1), followedby, event(’S1’,D2), followedafter, transition(T,D3), event(’S1’,D4),{uplimit(’S1’,UD), lowlimit(’S1’,LD), D is D1+D2+D3+D4, D<UD, D>LD}.duration(D) --> [D],{number(D)}.range(D) --> [D],{number(D)}.uplimit('S1',<value>).lowlimit('S1',<value>).
Implementation in PrologImplementation in Prolog
Facts
trans(T) --> [transition,period].op --> [’[’]. cp --> [’]’,sec].and --> [and].or --> [or].followedafter --> [followed,after].followedby --> [followed,by].simultaneity --> [is,more,or,less,simultaneous,with].succ(’A4’) --> [strong,airflow,with,snoring].succ(’A1’) --> [reduced,airflow,with,snoring].succ(’B6’) --> [intense,ribcage,and,abdominal,movements].
ConclusionsConclusions
– The induction of temporal grammatical rules for multivariate time series is feasible, if we introduce abstraction levels.
– Self-organizing Neural Networks are integrated into the rule induction process.
– Definitive Clause Grammars are suitable for an efficient implementation of temporal context.
– This approach was successfully applied to an application in medicine.