This operator compares the occurrence frequency of tuples (using the equal-method of the tuples) in two different windows. The first window (on port 0) has to be bigger or equal in size than the second window (on port 1). The relative occurrence frequency of the incoming tuple in the small and the big window is compared. If it's significant different (with the tolerance the user chose) an anomaly tuple will be generated.

The frequency-value: A value smaller than 1 means, that the tuple occurred less frequent (seldom) in the small window (compared to the big window). A value bigger than 1 means, that the tuple occurred more often in the small window.

Parameters

Example

#PARSER PQL
#ADDQUERY
bigWindow = ELEMENTWINDOW({
                size = 2000
              },
              System.state
            )
smallWindow = ELEMENTWINDOW({
                  size = 500
                },
                System.state
              )
frequencyAnalysis = FREQUENCYCOMPARE({
                        negativetolerance = 0.4,
                        positivetolerance = 0.4,
                        deliverfirstelements = 'true'
                      },
                      bigWindow,
                      smallWindow
                    )