1.0.1 • Published 7 years ago

anomaly-finder v1.0.1

Weekly downloads
26
License
ISC
Repository
github
Last release
7 years ago

anomaly-finder

Simple anomaly detector based on the three-sigma rule of thumb.

Example of usage:

import AnomalyFinder from 'anomaly-finder';

const af = new AnomalyFinder();

const normalValues = [ 5, 15, 30 ];
const valuesToCheck = [ 1, 33, 55 ];

let isAnomaly;
for (let i = 0; i < valuesToCheck.length; i++) {
  isAnomaly = af.find(normalValues, valuesToCheck[i]);
  console.log(`${valuesToCheck[i]} is anomaly: ${isAnomaly}`); 
}
  1. noramlValues - values that are seen regularly in a working system and are considered normal.
  2. valuesToCheck - new value to check against the list of normal values normalValues.

This module was inspired by anomaly-detector module.