This operator searches for anomalies in a sequence in comparison= to the learned sequences. To do this, the operator uses the deviation info= rmation created by the DeviationSequenceLearn operator. For each tuple of a seq= uence, the value is compared to the learned distribution (mean and standard= deviation). The data input port is 0, the input port with learn data is 1.=

**interval**Defines, how many standard deviations are all= owed for a tuple to be different from the mean. 3.0 is the default value. C= hoose a smaller value to get more anomalies**tupleCountLearnAttribute**The attribute name on the lea= rn port that gives the group count (the counter that gives each tuple in th= e sequence a number)**meanLearnAttribute**The attribute name on the learn por= t that has the mean**standardDeviationLearnAttribute**The attribute name on = the learn port that has the standard deviation**valueDataAttribute**Name of the attribute which should = be analysed**GROUP_BY**If you use a deviationSequenceLearn operator,= use 'group' as grouping attribute.**fastGrouping**Use hash code instead of tuple compa= re to create group. Potentially unsafe!

The DeviationSequenceAnomalyDetection operator uses the learned data fro= m the previous DeviationSequenceLearn operator.

=20

#PARSER = PQL #RUNQUERY /// Values above 50 will be 'true' (which means that the current sequence=20 starts / runs) and smaller values to 'false' (means: sequence ended) stateInfo =3D MAP({ expressions =3D ['temp', ['temp > 50', 'state']] = =20 }, System.manual ) =20 /// The elements within one sequence will be counted (starts from 1 with ea= ch new sequence) sequence =3D MAP({ expressions =3D ['temp','counter(state)'] = =20 }, stateInfo ) =20 /// The tuple which marks the end of the sequence (and itself is not part=20 of the sequence) has the counter_state_ 0 and will be filtered out=20 onlySequence =3D SELECT({PREDICATE =3D 'counter_state_ > 0'}, sequence) =20 /// Learn how a "normal" sequence is. The first 15 sequences will be learne= d and used as the definition of "normal" sequenceLearn =3D DEVIATIONSEQUENCELEARN({ group_by =3D ['counter_state_'], parameterAttribute =3D 'temp', sequencesToLearn =3D 15 =20 }, onlySequence ) =20 /// Check, if the current tuple of this sequence differes from the normal=20 tuples of the sequence at the specific point of the sequence sequenceAnalysis =3D DEVIATIONSEQUENCEANOMALYDETECTION({ interval =3D 4.0, standardDeviationLearnAttribute =3D 'standardDeviation'= , group_by =3D ['group'], meanLearnAttribute =3D 'mean', valueDataAttribute =3D 'temp' =20 }, 0:sequenceLearn, 1:sequenceLearn )=20