2017 © Pedro Peláez
 

library sax

PHP Implementation of Symbolic Aggregate Approximation

image

rmatil/sax

PHP Implementation of Symbolic Aggregate Approximation

  • Monday, August 25, 2014
  • by rmatil
  • Repository
  • 1 Watchers
  • 0 Stars
  • 19 Installations
  • JavaScript
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

SAX

PHP Implementation of Symbolic Aggregate Approximation (SAX), (*1)

Implementation of the suffix tree is based on the idea of "makagonov" on Stackoverflow, (*2)

Installation

Using composer:
$ php composer.phar require "rmatil/sax":"dev-master", (*3)

Usage

Step 1

Define a reference time series:, (*4)

// time series used as reference
$referenceTimeSeries =  array(
                            array("time" => 123451, "count" => 2),
                            array("time" => 123452, "count" => 1),
                            array("time" => 123453, "count" => 6),
                            array("time" => 123454, "count" => 4),
                            array("time" => 123455, "count" => 5),
                            array("time" => 123456, "count" => 0)
                        );

Step 2

Define a single or multiple time series to analyse:, (*5)

// single / multiple time series to analyse
$analysisTimeSeries = array(
                        array(
                            array("time" => 123411, "count" => -1),
                            array("time" => 123412, "count" => 1),
                            array("time" => 123413, "count" => 2),
                            array("time" => 123414, "count" => -1),
                            array("time" => 123415, "count" => 6),
                            array("time" => 123416, "count" => 30)
                        ));

// create a new instance of sax using the time series from above using the default alphabet size of 5
$sax = new SAX( $referenceTimeSeries, $analysisTimeSeries );

// or define the alphabet size by yourself ( must be greater than 2 and smaller than 11 ) 
$sax = new SAX( $referenceTimeSeries, $analysisTimeSeries, 8);

Step 3

Define a feature window length and a scanning window length:, (*6)

// tarzan needs the feature window length and the scanning window length 
// as parameters
$surprises = $sax->tarzan( 1, 2 );

Documentation

An auto generated documentation can be found here., (*7)

The Versions

25/08 2014

dev-master

9999999-dev http://github.com/rmatil/sax

PHP Implementation of Symbolic Aggregate Approximation

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

sax symbolic aggregate approximation