Code Examples
A repository of 155 code examples for BeepBeep
mining.trenddistance.SymbolDistributionClusters Class Reference

Trend distance based on the statistical distribution of symbols in a stream. More...

Static Public Member Functions

static void main (String[] args)
 

Detailed Description

Trend distance based on the statistical distribution of symbols in a stream.

In this example, a feature vector is computed from an input trace by calculating the fraction of a's and b's that occur in a sliding window of width 9 (see KmeansSymbolDistribution for an explanation of how this is computed). The reference pattern is a set of two-dimensional points, corresponding to the centroids of two clusters. The distance function computes the Euclidean distance between the computed feature vector and the closest centroid of the reference set. If this distance is greater than d=0.15, an alarm is raised.

For example, suppose that the two centroids have coordinates (0.7, 0.3) and (0.3, 0.7); they are represented by two crosses in the 2D plot below.

Plot

Consider the following window of 9 events:

a, b, a, b, a, b, a, b, a

The feature vector extracted from this window is (0.56, 0.44) (red dot in the plot above). The centroid closest to this point is (0.7, 0.3), but its distance is 0.2, which is greater than 0.15. In that case, the feature vector is considered "too far" from existing clusters, and an alarm is raised.

The parameters of the TrendDistance processor in this example are as follows:

ParameterValue
Window Width
9
Beta processor
Processor chain
Reference Pattern
{(0.7, 0.3), (0.3, 0.7)}
Distance Function
Distance Function
(DistanceToClosest using EuclideanDistance metric)
Comparison Function
≤
Distance Threshold

¼

Author
Sylvain Hallé

Definition at line 113 of file SymbolDistributionClusters.java.


The documentation for this class was generated from the following file: