Code Monkey home page Code Monkey logo

graphite_asap's Introduction

Graphite-ASAP

This is a graphite-api function for the ASAP dynamic smoothing algorithm

https://arxiv.org/pdf/1703.00983.pdf

http://github.com/stanford-futuredata/ASAP

NOTE: ABOUT GRAPHITE API

this requires the MAIN BRANCH of graphite-api, the current 1.1.3 version is not really up-to-date

pip install --upgrade git+https://github.com/brutasse/graphite-api

Install

pip install --upgrade git+https://github.com/wyndhblb/graphite_asap

Note On Nulls

If you data as "nulls/Nones" in the data list, it will FORCE them to be 0, otherwise the algorithm cannot really function, as it needs to be able to dynamically compute windowing layers.

Notes on the ASAP algo

This is a dynamic windowing algorithm, meaning that the returned vector is NOT necessarily going to be the same length as the one you wish. If you want a 500 point vector back you can easily get much lower then that if the windowing deems it ok. For very "flat" data (i.e. sigma^4 is very small) you may even just get a few points.

In your graphing world it's recommended you use "connected" lines, not just points, as the returned data can be very sparse.

Steps

What this means is that the "step" (or delta time between points) may not be an int, but a float. Unfortunately, graphite does not like floats for the steps size.

Graphite-api, when using the Graphing (not the json) output actually does ok with floats, the json writer does not, and so we must attempt to round the resulting step size.
As a result your graphs may look like there is the data does not transport all the way to the end of the graph due to what appears to be a "timeshift" because the time step over the run of a few hundred points with out the floating point precision will loose (or gain) too much time between steps.

(There is probably an easy interpolation sort of fix for this, just have not implemented it yet)

usage

In the graphite-api.yaml file install this package and then add to the functions list

functions:
    - ... the other functions ...
    - graphite_asap.functions.ASAPFunctions

And in your favorite query engine

# attempt to get a vector with 10second steps
http://xxx/render?target=asap(path.to.metric, '10s')

# attempt to get a vector that has roughly this number of points
http://xxx/render?target=asap(path.to.metric, 100)

In action

asapdemo

graphite_asap's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.