Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jacobq/peirce-criterion

Functions for outlier removal using Peirce's criterion
https://github.com/jacobq/peirce-criterion

Last synced: 1 day ago
JSON representation

Functions for outlier removal using Peirce's criterion

Awesome Lists containing this project

README

        

# peirce-criterion

## Introduction

For starters, this ports the Python implementation found on
[the Wikipedia article](https://en.wikipedia.org/wiki/Peirce%27s_criterion).
Additionally, this package provides a function called `remove_outliers`
that uses Peirce's method (as [described here][method]) to remove outliers
from an array of numbers.

## Usage

```js
const { remove_outliers } = require('peirce-criterion');
const raw_data = [1, 2, 3, 99];
const trimmed_data = remove_outliers(raw_data);
console.log(trimmed_data); // [1, 2, 3]
```

[method]: (https://classes.engineering.wustl.edu/2009/fall/che473/handouts/OutlierRejection.pdf)