Skip to content
This repository has been archived by the owner on Oct 29, 2023. It is now read-only.
/ sax Public archive

C++ implementation of Symbolic Aggregate Approximation, with fractional sliding window, numerosity reduction, and scaling.

License

Notifications You must be signed in to change notification settings

melsabagh/sax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#SaxQuantizer

A time/space optimized implementation of Symbolic Aggregate approXimation (SAX), with numerosity reduction and scaling. This is based on ``A Symbolic Representation of Time Series, with Implications for Streaming Algorithms,'' by Jessica Len et al.


Dependencies

  • C++ compiler with C++11 support
  • Boost Math

Usage

Simply include saxquantizer.hpp in your project, and use the provided functions from the SaxQuantizer namespace.

See docs for detailed description.


Example:

#include <vector>
#include <string>
#include <iostream>
#include "saxquantizer.hpp"

using namespace std;

int main(int argc, char **argv) {
  SaxQuantizer::Sax sax(6, 1, 5);
  vector<double> input = { 1, 1, 1, 1, 2, 2, 10, 10, 100 };
  vector<int> output;
  sax.quantize(input, &output, false); // true for reduction

  cout << "input:";
  for (const auto & x : input) cout << " " << x;
  cout << endl;

  cout << "output:";
  for (const auto & x : output) cout << " " << x;
  cout << endl;
}

About

C++ implementation of Symbolic Aggregate Approximation, with fractional sliding window, numerosity reduction, and scaling.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages