Giter VIP home page Giter VIP logo

node-red-contrib-p2's Introduction

node-red-contrib-P2

Background

The 𝗣² algorithm of Jain and Chlamtec (1985) for dynamic calculation of quantiles without storing observations.

Communication of the ACM, October 1985, Volume 28, Number 10, Page 1076.

A heuristic algorithm for dynamic calculation of the median and other quantiles. The estimates are produced dynamically as the observations are generated. The observations are not stored; therefore, the algorithm has a very small and fixed storage requirement regardless of the number of observations.

Installation

Download the ....tgz archive and install via node-red-editor menu "manage palette > install > upload button" .

Configuration

Quantiles - an array of numbers between 0 and 1, representing the quantiles the node should estimate from the stream of incoming data. a single quantile must also be specified as an array: [0.5] will estimate the median. the three quartils can be configured with [0.25,0.5,0.75] for example.

Input

msg.payload - number or array of numbers. the algorithm operates on numbers only. array data is processed as separate data streams for every array position.

msg.topic - String. different topics are also treated as separate data streams.

Output

msg properties are not changed, except

msg.Quantile - Object. property is added to the message with the resulting estimates for the configured quantile(s). if payload was an array on input, msg.Quantile will be the corresponding array of quantiles.

Details

A msg.reset (any value) resets the accumulated data for the resp. topic. A msg.reset without msg.topic resets all topics in one go.

Accumulated data is held in the default context store. if the default context store is persistent, so is the accumulated data.

Essential parts of javascript function code created after C++ code of the GNU Scientific Library

node-red-contrib-p2's People

Contributors

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