Git Product home page Git Product logo

cabba's Introduction

cabba: An efficient symbolic representation for time series

C/C++ CI License

ABBA is an accurate symbolic representation of time series based on an adaptive polygonal chain approximation followed by a mean-based clustering algorithm. The Python package and detailed description has been shown in ABBA and fABBA. cabba is undergoing project that contains implementation for ABBA (to be built) and fABBA.

Install

Install cabba simply by:

git clone https://github.com/nla-group/cabba.git
cd cabba
cmake . # or mkdir build -> cd build -> cmake ../
make 
cp *.a /usr/lib 
cp include/*.h /usr/include 

After that, we can include the cabba library with #include "ABBA.h" in include folder.

API

The below shows the use of cabba to perform symbolic transform:

#include <iostream>
#include <vector>
#include <chrono> 
#include "gents.h" // generate random noise as time series
#include "ABBA.h" // include library

using namespace std;

int main(){
    size_t series_size = 10000; // time series length
    
    double tol(0.01), alpha(0.01); // parameter for ABBA
    vector<string> symbols;
    vector<double> r_fabba_series;

    string dist="uniform";
    vector<double> ts = generate_random_sequence(series_size, dist);
    
    ABBA fabba(tol, alpha, "lexi", 1, series_size, true); // define ABBA object
    symbols= fabba.fit_transform(ts); // transform time series into symbols
    reconstruction = fabba.inverse_transform(ts[0]); // reconstruct time series from symbols
    
    return 0;
 }

You can visit further user instruction in the example of runtest.cpp.

Reference

[1] X. Chen and S. Güttel. An efficient aggregation method for the symbolic representation of temporal data. Published online in ACM Transactions on Knowledge Discovery from Data, 2022.

[2] S. Elsworth and S. Güttel. ABBA: adaptive Brownian bridge-based symbolic aggregation of time series. Data Mining and Knowledge Discovery, 34: 1175-1200, 2020.

License

All the content in this repository is licensed under the New BSD License.

Copyright © 2022 nla group

cabba's People

Contributors

chenxinye avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.