This operator learns the mean and the standard deviation of a single value and writes it into the output. On port 0, the learned values (mean and standard deviation) are put out, on port 1 the tuples which are used to learn the deviation. The operator puts out the original tuples with the groupId the operator chose for the tuple. This is necessary for the following operator to be able to map the deviation values from port 0 to the correct tuples on port 1.

Parameters

Example

In this example, the online-algorithm is used to learn the deviation. Therefore, no window is needed. The deviation is learned for the parameter "temp". The following operator uses the original tuples with the group of the DeviationLearn operator (1:deviationLearner) and the learned deviation (0:deviationLearner).

#PARSER PQL
#ADDQUERY
/// Use the online training mode to learn the mean and the standard deviation
deviationLearner = DEVIATIONLEARN({
                        trainingmode = 'ONLINE',
                        nameofparameter = 'temp'
                      },
                      System.manual
                    )
                    
/// Compare the current tuple with the learned values
deviationAnalysis = DEVIATIONANOMALYDETECTION({
                        interval = 3.0,
                        nameofparameter = 'temp'
                      },
                      1:deviationLearner,
                      0:deviationLearner
                    )