DBSOD: Density-Based Spatial Outlier Detection
Project description
DBSOD: Density-Based Spatial Outlier Detection
Official implementation of "DBSOD: Density-Based Spatial Outlier Detection". Paper preprint is coming soon.
Algorithm
While DBSCAN is a widely used clustering algorithm, it only provides a binary label for outliers and does not assign a continuous outlierness score. To address this limitation, we propose DBSOD, a density-based spatial outlier detection method inspired by DBSCAN. The algorithm estimates the consistency with which a data point is identified as an outlier across a range of neighborhood sizes:
The algorithm systematically varies the neighborhood size parameter $\epsilon$, evaluating outlierness across multiple density assumptions. By aggregating binary outlier classifications across these scales, it produces a normalized outlierness score for each point, reflecting how consistently the point is identified as an outlier.
Installation
Note: the package was developed for Linux (manylinux, x86_64) machines.
You can install package using pip:
pip install dbsod
Alternatively (for instance if you want to contribute) you may clone this repository, build dbsod and install it in .venv in editable mode:
git clone https://github.com/Kowd-PauUh/dbsod.git
cd dbsod
make install_g++
make install_eigen
make venv
Usage
Take as an example this dataset:
import numpy as np
DATA = np.array([
[0.35, 0.18],
[0.60, 0.16],
[0.40, 0.18],
[0.40, 0.30],
[0.30, 0.70],
])
We can use dbsod to calculate outlierness score for each point:
from dbsod import dbsod
EPS_SPACE = [0.15, 0.22] # `eps` parameters used for calculating normalized outlierness score
MIN_PTS = 2 # minimum number of neighbors for the data point to become "core" point
# compute outlierness scores
outlierness_scores = dbsod(
X=DATA,
eps_space=EPS_SPACE,
min_pts=MIN_PTS,
metric='euclidean'
)
print(outlierness_scores)
The output will be: array([0. , 0.5, 0. , 0. , 1. ]).
Below is the visualization of this example:
On the real-world data (check out this example) result of DBSOD would look like:
Citation
@software{danylenko2025dbsod,
author = {Danylenko, Ivan},
doi = {10.5281/zenodo.17806900},
month = jul,
title = {{DBSOD: Density-Based Spatial Outlier Detection}},
url = {https://github.com/Kowd-PauUh/dbsod},
version = {0.0.5},
year = {2025}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dbsod-0.0.5-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: dbsod-0.0.5-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.14t, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
383bd7f44c41857fb661173049dabe4eb81a8a3cc0cb12d70c30c17407a9143e
|
|
| MD5 |
74c875bb882d91a6277ef2e7679f7275
|
|
| BLAKE2b-256 |
6d29ea084390e18185a93f4d43e8efa8edf1f1003d419824a94f1ac1d2ab374a
|
Provenance
The following attestation bundles were made for dbsod-0.0.5-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
python-publish.yml on Kowd-PauUh/dbsod
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dbsod-0.0.5-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
383bd7f44c41857fb661173049dabe4eb81a8a3cc0cb12d70c30c17407a9143e - Sigstore transparency entry: 1262013792
- Sigstore integration time:
-
Permalink:
Kowd-PauUh/dbsod@ac81338e1ae8e6ad0c327143fd2a34ac3cb230fd -
Branch / Tag:
refs/tags/v0.0.5 - Owner: https://github.com/Kowd-PauUh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ac81338e1ae8e6ad0c327143fd2a34ac3cb230fd -
Trigger Event:
release
-
Statement type:
File details
Details for the file dbsod-0.0.5-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: dbsod-0.0.5-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.4 MB
- Tags: CPython 3.14, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
132e37f48157cdd042dc6bc2a0f2b6aec8f8f120f4a8d84a3dfacaa49440b65d
|
|
| MD5 |
84d8d13ec3c0114f878a76e5b5330946
|
|
| BLAKE2b-256 |
d17f08d05858b0ee89fb56ee918c626d4bd3f4c38da5d247c9a74450a39c9ac2
|
Provenance
The following attestation bundles were made for dbsod-0.0.5-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
python-publish.yml on Kowd-PauUh/dbsod
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dbsod-0.0.5-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
132e37f48157cdd042dc6bc2a0f2b6aec8f8f120f4a8d84a3dfacaa49440b65d - Sigstore transparency entry: 1262013943
- Sigstore integration time:
-
Permalink:
Kowd-PauUh/dbsod@ac81338e1ae8e6ad0c327143fd2a34ac3cb230fd -
Branch / Tag:
refs/tags/v0.0.5 - Owner: https://github.com/Kowd-PauUh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ac81338e1ae8e6ad0c327143fd2a34ac3cb230fd -
Trigger Event:
release
-
Statement type:
File details
Details for the file dbsod-0.0.5-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: dbsod-0.0.5-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.4 MB
- Tags: CPython 3.13, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f14f2b5e9da45c7169174e5fe5e6b814b1597acbf86530980ee71ab855be650
|
|
| MD5 |
54767c89102467aca1b03a83cda33f4c
|
|
| BLAKE2b-256 |
acdb27ee96479fba41b56f1b65acb2135dee6faf8b95f67d3f7505abe742a04b
|
Provenance
The following attestation bundles were made for dbsod-0.0.5-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
python-publish.yml on Kowd-PauUh/dbsod
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dbsod-0.0.5-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
7f14f2b5e9da45c7169174e5fe5e6b814b1597acbf86530980ee71ab855be650 - Sigstore transparency entry: 1262014127
- Sigstore integration time:
-
Permalink:
Kowd-PauUh/dbsod@ac81338e1ae8e6ad0c327143fd2a34ac3cb230fd -
Branch / Tag:
refs/tags/v0.0.5 - Owner: https://github.com/Kowd-PauUh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ac81338e1ae8e6ad0c327143fd2a34ac3cb230fd -
Trigger Event:
release
-
Statement type:
File details
Details for the file dbsod-0.0.5-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: dbsod-0.0.5-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.4 MB
- Tags: CPython 3.12, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4e5e3465f4101a50f2eb2a54f3ea6db112d2660221dbffe0b98b05d7cecbb37
|
|
| MD5 |
fa85119d62a938e7e3825c57de22d37c
|
|
| BLAKE2b-256 |
63611f6b5103d4eef2236fdb997b8e5fbeda45d9b1aa6bad51d82a87f1b98b1c
|
Provenance
The following attestation bundles were made for dbsod-0.0.5-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
python-publish.yml on Kowd-PauUh/dbsod
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dbsod-0.0.5-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
c4e5e3465f4101a50f2eb2a54f3ea6db112d2660221dbffe0b98b05d7cecbb37 - Sigstore transparency entry: 1262014011
- Sigstore integration time:
-
Permalink:
Kowd-PauUh/dbsod@ac81338e1ae8e6ad0c327143fd2a34ac3cb230fd -
Branch / Tag:
refs/tags/v0.0.5 - Owner: https://github.com/Kowd-PauUh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ac81338e1ae8e6ad0c327143fd2a34ac3cb230fd -
Trigger Event:
release
-
Statement type:
File details
Details for the file dbsod-0.0.5-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: dbsod-0.0.5-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.3 MB
- Tags: CPython 3.11, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0695089e3abd499cd4c5defcc5968c4abd78283592d2152c605f59c3999852a
|
|
| MD5 |
19d19f9437a95ab7b3f0d1a48e1c21a2
|
|
| BLAKE2b-256 |
0073889c6f6facbdda8e1f61503c39a3d5c65f7bcf689463b31ca32c5ea03a4e
|
Provenance
The following attestation bundles were made for dbsod-0.0.5-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
python-publish.yml on Kowd-PauUh/dbsod
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dbsod-0.0.5-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
d0695089e3abd499cd4c5defcc5968c4abd78283592d2152c605f59c3999852a - Sigstore transparency entry: 1262013718
- Sigstore integration time:
-
Permalink:
Kowd-PauUh/dbsod@ac81338e1ae8e6ad0c327143fd2a34ac3cb230fd -
Branch / Tag:
refs/tags/v0.0.5 - Owner: https://github.com/Kowd-PauUh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ac81338e1ae8e6ad0c327143fd2a34ac3cb230fd -
Trigger Event:
release
-
Statement type:
File details
Details for the file dbsod-0.0.5-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: dbsod-0.0.5-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.3 MB
- Tags: CPython 3.10, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93d9e0699cf51dd79c38d7c74e5cc041538166bdf27a6c3cf60764bdd01e8a72
|
|
| MD5 |
0b1759d5cdbacc95150e5a04690337f7
|
|
| BLAKE2b-256 |
a80fd63320149e957fe74df0a1b049dbeaaf1974de8b488bda4726bd5dde133a
|
Provenance
The following attestation bundles were made for dbsod-0.0.5-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
python-publish.yml on Kowd-PauUh/dbsod
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dbsod-0.0.5-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
93d9e0699cf51dd79c38d7c74e5cc041538166bdf27a6c3cf60764bdd01e8a72 - Sigstore transparency entry: 1262013858
- Sigstore integration time:
-
Permalink:
Kowd-PauUh/dbsod@ac81338e1ae8e6ad0c327143fd2a34ac3cb230fd -
Branch / Tag:
refs/tags/v0.0.5 - Owner: https://github.com/Kowd-PauUh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ac81338e1ae8e6ad0c327143fd2a34ac3cb230fd -
Trigger Event:
release
-
Statement type: