$referenceSuffixTree
$referenceSuffixTree : \Sax\SuffixTree\SuffixTree
Tree representing all suffixes of the reference "sax word"
Class handling the functionality of the symbolic aggregate approximation algorithm.
$referenceSuffixTree : \Sax\SuffixTree\SuffixTree
Tree representing all suffixes of the reference "sax word"
$analysisSuffixTree : \Sax\SuffixTree\SuffixTree
Trees representing all suffixes of the analysis sax words
__construct(array $pReferenceTimeSeries, array $pAnalysisTimeSeries, integer $pAlphabetSize = 5)
[__construct description]
array | $pReferenceTimeSeries | Time series used as reference. Must contain
|
array | $pAnalysisTimeSeries | Array of time series to analyse. Each time series
|
integer | $pAlphabetSize | Size of the alphabet used for discretization process.
|
preprocess(string $pSaxReferenceString, array $pSaxAnalysisStrings) : array
Creates the suffix trees for the given reference string and the strings under analysis. Annotates the occurences of each substring in the corresponding node of the tree.
string | $pSaxReferenceString | Discretized reference string (i.e. sax word) |
array | $pSaxAnalysisStrings | Array of discretized string representing
|
Returns an array containing the analysis
trees annotated with their surprise values
tarzan(integer $pFeatureWindowLength, integer $pScanningWindowLength) : array
Calculates surprise values of the analysis time series in respect to the reference time series. If a surprise value exceeds the given threshold, the pair ( index, surprise value ) is added to the result array.
integer | $pFeatureWindowLength | Feature window length
|
integer | $pScanningWindowLength | Length of substrings to scan the
|
Array containing the found surprise values.
Key is the analysis series sax word, values
representing surprise pairs of ( index, surprise value )
computeStatistics(array $pTimeSeries) : array
Calculates the minimum, maximum, standard deviation, mean, sum and the size of the given time series. It must contain the key 'count' for each entry.
array | $pTimeSeries | Time series to calculate the described attributes |
An array containing the attributes described above
normalizeTimeSeries(array $pTimeSeries, float $pMean, float $pStdDev, boolean $isReference) : array
Normalizes a given time series to N(0,1) with a given mean and standard deviation.
isReference indicates whether the time series is only a one dimensional timeseries representing the reference timeseries or a two dimensional array representing an array of analysis time series.
array | $pTimeSeries | Timeseries to normalize |
float | $pMean | Mean to use for normalization |
float | $pStdDev | Standard deviation to use for normalization |
boolean | $isReference | True, if $pTimeSeries represents the reference timeseries |
The normalized timeseries
discretizeTimeSeries(array $pTimeSeries, integer $pFeatureWindowLength = 1) : string
Discretizes a given time series to a "sax word", i.e. a sequence of characters indicating the amplitude of the time series.
array | $pTimeSeries | Time series to discretize |
integer | $pFeatureWindowLength | Amount of datapoints which will used as a single
|
The sax word
annotateSurpriseValues(\Sax\SuffixTree\SuffixTree $pReferenceTree, \Sax\SuffixTree\SuffixTree $pAnalysisTree)
Annotates surprise values at each node of the analysis tree in context of the reference tree
\Sax\SuffixTree\SuffixTree | $pReferenceTree | Suffix tree of the reference time series |
\Sax\SuffixTree\SuffixTree | $pAnalysisTree | Suffix tree of the time series under analysis |
annotateNode(\Sax\SuffixTree\SuffixTree $pReferenceTree, \Sax\SuffixTree\SuffixTree $pAnalysisTree, \Sax\SuffixTree\Node $pNode, string $representedString)
Annotates the analysis tree with surprise values in respect to the reference tree in a recursive manner.
\Sax\SuffixTree\SuffixTree | $pReferenceTree | Tree to use substring occurences as reference |
\Sax\SuffixTree\SuffixTree | $pAnalysisTree | Tree on which to calculate surprise values |
\Sax\SuffixTree\Node | $pNode | Current active node ( on the beginnig: the root node ) |
string | $representedString | Substring of the whole string represented by the
|