Skip to main content

Implementation of the LOCI outlier detection algorithm in Python

Project description

This is an implementation of the LOCI (local correlation integral) fast outlier detection algorithm in Python, based on the paper:
Papadimitriou, S., Kitagawa, H., Gibbons, P.B. and Faloutsos, C., 2003, March. Loci: Fast outlier detection using the local correlation integral. In Data Engineering, 2003. Proceedings. 19th International Conference on (pp. 315-326). IEEE.

This is an initial first attempt implementation, it is functional (I think) however performance is very limited.

Installation
pip install loci
Dependencies
  • Scipy, Numpy
  • Python version 3.6 (probably works with 3.x, not tested though)
Example
import numpy as np
import matplotlib.pyplot as plt

from loci.loci import run_loci

data = np.concatenate((np.array([(10, 10), ]), np.random.normal(50, 10, (200, 2))))

loci_res = run_loci(data)
outlier_indices = loci_res.outlier_indices

plt.scatter(data[:, 0], data[:, 1])
plt.scatter(data[outlier_indices, 0], data[outlier_indices, 1], c='r')
plt.show()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

loci-0.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file loci-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: loci-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for loci-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 11ac4c26ceb3f5db23d333d5024f59c8096746add0d56a3c30cf060581f42f4a
MD5 21d7ec2bda788edf78d37b0e5390718a
BLAKE2b-256 93af2ad32a8f485a260e14c6129bb188609b57e1ea154e20440319d9ddeef7bd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page