Skip to main content

This package provides a Statistical Inference framework for testing the anomaly results obtained by DBSCAN algorithm.

Project description

Statistical Inference for Cluster-based Anomaly Detection

This package provides a Statistical Inference framework for Cluster-based Anomaly Detection, with controllable FPR. In particular, we propose a valid p-value for testing the anomaly results obtained by DBSCAN algorithm. Basically, the problem is decomposed into multiple tractable sub-problems to enable an efficient test with the highest TPR while controlling the FPR through the divide-and-conquer approach.

This package has the following requirements:

mpmath
numpy>=1.23.0
scipy>=1.4.1

Installization

You can install this package from PyPI using:

pip install si-clad

Example

from si_clad import SI_CLAD, generate, DBSCAN_AD

n = 50
d = 10
delta =  0 #no true outliers
X, Sigma, _ = generate(n, d, delta)

minpts =  10
eps = 3
O, _ = DBSCAN_AD(eps, minpts).fit(X)
p_value = SI_CLAD(X, Sigma, minpts, eps, O, j = None) #randomly choose an outlier j for testing

print(p_value)

Project details


Download files

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

Source Distribution

si-clad-0.0.2.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

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

si_clad-0.0.2-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file si-clad-0.0.2.tar.gz.

File metadata

  • Download URL: si-clad-0.0.2.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for si-clad-0.0.2.tar.gz
Algorithm Hash digest
SHA256 b40efaa71def281d436b172e3bf5536ec3f2b846a087f96248ca1e4fde092110
MD5 5507ca66c2d0452e5c3f9bdb7c1fc3a5
BLAKE2b-256 67e0f85c5a5c6ac7361a836aca7ff6dbe29c90d29d8695ce9af26170b151ec77

See more details on using hashes here.

File details

Details for the file si_clad-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: si_clad-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for si_clad-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a02923d7ac021170d639871d6503eef133ad4321d9d176b94d25adab0177c295
MD5 d47d20861691853703126532374a573e
BLAKE2b-256 c8e786b06499480c9aef80fb9f147bff100da9a88d86fff5cbf1d1aaa202c1ce

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