anomaly-finder
v1.0.1
Published
Simple anomaly detector based on 3 sigma rule
Downloads
362
Readme
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}`);
}
noramlValues
- values that are seen regularly in a working system and are considered normal.valuesToCheck
- new value to check against the list of normal valuesnormalValues
.
This module was inspired by anomaly-detector module.