🎯 missoutlier
Outlier Detection Using the MISS Method
A weighted composite of MAD, IQR, and SD for robust univariate outlier detection
Overview
missoutlier implements the MISS (MAD–IQR–SD Simultaneous) method, a new approach for univariate outlier detection that combines three classical techniques into a single robust threshold:
| Method | Bounds | Weight |
|---|---|---|
| MAD (Median Absolute Deviation) | median ± 1.5 × MAD |
87.8% |
| IQR (Interquartile Range) | Q25/Q75 ± 1 × IQR |
1.2% |
| SD (Standard Deviation) | mean ± 5 × SD |
11.0% |
The composite threshold is computed as:
$$\text{MISS} = 0.878 \times \text{MAD} + 0.012 \times \text{IQR} + 0.11 \times \text{SD}$$
By heavily weighting the robust MAD while retaining sensitivity from IQR and SD, MISS offers a balanced approach that handles skewed and heavy-tailed distributions better than any single method alone.
Installation
# Install from PyPI
pip install missoutlier
Or install directly from GitHub:
pip install git+https://github.com/GuillaumePech/missOutlierPy.git
Dependencies: numpy >= 1.20, scipy >= 1.7
Quick Start
import numpy as np
from missoutlier import detect_outliers_miss
# Generate data with outliers
x = np.concatenate([np.random.randn(100), [50, -40]])
# Default: replace outliers with NaN
x_clean = detect_outliers_miss(x)
# Detected 2 outliers (1.96% of data) using MISS method.
# Drop outliers entirely
x_dropped = detect_outliers_miss(x, drop=True)
# Detected 2 outliers (1.96% of data) using MISS method.
# Handle existing NaNs
x_na = np.concatenate([np.random.randn(100), [np.nan, 50]])
x_clean = detect_outliers_miss(x_na, na_rm=True)
# Silent mode (no messages)
x_clean = detect_outliers_miss(x, silent=True)
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
data |
array-like | — | Input data (must be one-dimensional) |
drop |
bool | False |
If True, removes outliers. If False, replaces them with NaN |
na_rm |
bool | False |
If True, ignores NaN values when computing thresholds |
silent |
bool | False |
If True, suppresses the detection message |
How It Works
┌──────────────┐
│ Input Data │
└──────┬───────┘
│
┌────────────┼────────────┐
▼ ▼ ▼
┌─────────┐ ┌─────────┐ ┌─────────┐
│ 1.5 MAD │ │ 1 IQR │ │ 5 SD │
│ ×0.878 │ │ ×0.012 │ │ ×0.11 │
└────┬────┘ └────┬────┘ └────┬────┘
│ │ │
└────────────┼────────────┘
▼
┌────────────────┐
│ MISS Threshold │
└────────┬───────┘
▼
┌────────────────┐
│ Flag Outliers │
└────────────────┘
Citation
If you use this package in your research, please cite:
Pech, G., Vaccaro, N., Caspar, E. A., Amerio, P., Cleeremans, A., Leys, C., & Ley, C. (2026). How not to MISS an outlier: comparing three classic univariate methods and introducing a new one, the MAD–IQR–SD Simultaneous (MISS). PsyArXiv. https://doi.org/10.31234/osf.io/2r9yw_v2
License
MIT © Guillaume Pech
Metadata
Release files for missoutlier 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| missoutlier-0.1.2.tar.gz | 5.3 kB | Without provenance | Details for missoutlier-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| missoutlier-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for missoutlier-0.1.2-py3-none-any.whl |
Total release size: 11.0 kB
Release files / missoutlier-0.1.2.tar.gz
| Download URL | missoutlier-0.1.2.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c336119c13bcb051a70ab8a935d8e26715db8ce1f989b0efec8152a1ee4c7829
|
|
BLAKE2b-256 checksum How to use checksums |
89c914ce240f7b1caa07f5a0404b1569a7f3ffc4b73e21759aa07d14bdf17b30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.18
|
Release files / missoutlier-0.1.2-py3-none-any.whl
| Download URL | missoutlier-0.1.2-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
980e429a98097c52b4df4f69aa3ace49d9aa68db8e735d6a858e96f534ae307e
|
|
BLAKE2b-256 checksum How to use checksums |
3cd4b887f68efd260969b34617955fe3367a625110867cd906d71e158038b6d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.18
|
Security for missoutlier 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.