JSPM

outlier2

3.14.159265
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 10
  • Score
    100M100P100Q32151F
  • License MIT

Find outliers in dataset

Package Exports

  • outlier2

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (outlier2) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Outlier2

Compilation of other packages to find outliers in dataset.

Supported criteria/test

  • 3 sigma
  • Grubbs
  • Interquartile range
  • Iglewicz and Hoaglin method (MAD)
  • Median Differencing
  • Any external e.g. R-script (see test.js for more details)

Install

npm i outlier2

Usage

var outlier = require('outlier2');

var arr = [-2, 1, 2, 2, 3, 4, 15]; 
// Sync
outlier.mad(arr) // Return outlier values [15]
outlier.mad(arr, {indexes: true}) // Return outlier indexes [6]

// Async
outlier.mad(arr, {indexes: true}, function (err, outliers) {
    console.log((err) ? err : outliers);
})