Code Examples
A repository of 155 code examples for BeepBeep
Package mining.trenddistance

Evaluate an event stream based on a distance to a reference trend. More...

Classes

class  AverageValueAbsolute
 Trend distance based on the average of values in a stream. More...
 
class  AverageValueRelative
 Trend distance based on the average of values in a stream. More...
 
class  MaxSymbols
 Trend distance based on the maximum number of distinct symbols in a stream. More...
 
class  SymbolDistribution
 Trend distance based on the statistical distribution of symbols in a stream. More...
 
class  SymbolDistributionClusters
 Trend distance based on the statistical distribution of symbols in a stream. More...
 

Detailed Description

Evaluate an event stream based on a distance to a reference trend.

The examples in this section make use of the TrendDistance pattern, illustrated as follows.

Processor graph

This pattern can be interpreted as follows:

  1. A stream of events is sent into a Window processor to keep a suffix of width n
  2. The events of that window are sent to a trend processor, noted by β, which computes a "trend" over that window
  3. A reference trend (P) is given to a distance function (δ) along with the trend computed over the window.
  4. The resulting distance is given to a comparison function (), which checks if that distance is "smaller" than some given distance threshold (d)

It is possible, however, to encapsulate this process into a GroupProcessor, which becomes a generic pattern whose actual computation is based on six parameters: n, β, P, δ, ⊑, and d.

Processor graph

Depending on how these six parameters are instantiated, the TrendDistance processor computes different things. The examples in this section show different ways of using the TrendDistance pattern.

Author
Sylvain Hallé