Skip to main content

fdc — Fast Density Clustering

A Python package for clustering low-dimensional data using kernel density maps and density graphs. Ships with a Rust extension for 2–3x acceleration out of the box.

Features

  • No cluster count required — automatically discovers the number of clusters
  • Non-convex clusters — handles crescents, rings, and other complex shapes
  • Multiscale — works with varying densities and population sizes
  • Fast — O(n log n) time, O(n) memory via KD-tree search
  • Rust-accelerated — optional native extension for 2–3x speedup (pre-built wheels for Linux, macOS, Windows)
  • Two parameters — neighborhood size (auto) and noise threshold (eta)

Installation

pip install fdc

Pre-built wheels include the Rust extension. Falls back to pure Python if no wheel is available.

Quick start

from fdc import FDC
from sklearn.datasets import make_blobs
from sklearn.preprocessing import StandardScaler

X, y = make_blobs(n_samples=5000, n_features=2, centers=10)
X = StandardScaler().fit_transform(X)

model = FDC(eta=0.5)
model.fit(X)
print(f"Found {len(model.idx_centers)} clusters")

Performance vs C-backed competitors (100K points, 2D)

Algorithm Runtime
FDC (Rust) 1.8s
FDC (Python) 4.8s
DBSCAN (sklearn/C) 23.7s
HDBSCAN (sklearn/C) 61.8s

Links

Citation

@article{mehta2018high,
  title={A high-bias, low-variance introduction to Machine Learning for physicists},
  author={Mehta, Pankaj and Bukov, Marin and Wang, Ching-Hao and Day, Alexandre GR and Richardson, Clint and Fisher, Charles K and Schwab, David J},
  journal={arXiv preprint arXiv:1803.08823},
  year={2018}
}

License

MIT

Metadata

Release files for fdc 1.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fdc 1.17
File Size Uploaded
fdc-1.17.tar.gz 6.7 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for fdc 1.17
File
fdc-1.17-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
fdc-1.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
fdc-1.17-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ ARM64 Details
fdc-1.17-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
fdc-1.17-cp312-cp312-macosx_10_12_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.12+ x86-64 Details
fdc-1.17-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
fdc-1.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
fdc-1.17-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ ARM64 Details
fdc-1.17-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
fdc-1.17-cp311-cp311-macosx_10_12_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.12+ x86-64 Details
fdc-1.17-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
fdc-1.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
fdc-1.17-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ ARM64 Details
fdc-1.17-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
fdc-1.17-cp310-cp310-macosx_10_12_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.12+ x86-64 Details

Total release size: 12.7 MB

Release files / fdc-1.17.tar.gz

Download URL fdc-1.17.tar.gz
Size 6.7 MB
Tags Source
SHA-256 checksum
How to use checksums
8e84d4926aefdd3f7c37066c4765eee167aa68a6028b9f599a4bd8188e66626e
BLAKE2b-256 checksum
How to use checksums
70897a9db30584cb75cbbe261d324dac920caf5c1aac828bdf21e5053526ba9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / fdc-1.17-cp312-cp312-win_amd64.whl

Download URL fdc-1.17-cp312-cp312-win_amd64.whl
Size 324.5 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
49d364950c57381f46de94bf2db1b0d04afed47ca748f6f972bf9c2ab1dfb610
BLAKE2b-256 checksum
How to use checksums
5f68b0d0eae3d3c813aee8e1fa5e8866cabb203af41b814a4028513ffad6bfc7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / fdc-1.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL fdc-1.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 446.2 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
100a09457bf23befcc14373b6d5c5847cc22ec21808c9b09dd865e107d73f3ed
BLAKE2b-256 checksum
How to use checksums
e80f04b90d0147dfa3a602001d842a5ef1b0295f9412ff78e01bd0e38132cf78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / fdc-1.17-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL fdc-1.17-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 423.8 kB
Tags CPython 3.12 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
ea6e7000da6882d0ab3d076e6ecaf1819da8f31db9fcd0db6c8c15bb097e64de
BLAKE2b-256 checksum
How to use checksums
bc28d4326c5307a8f3415aed57ec39585f0297f2e27ed3ec90ea34bbb840a23f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / fdc-1.17-cp312-cp312-macosx_11_0_arm64.whl

Download URL fdc-1.17-cp312-cp312-macosx_11_0_arm64.whl
Size 394.2 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e4cfbd8dfe50a164ea3d1010179812f14ca6a7915c9fdbd0a5cdbcd9eba84379
BLAKE2b-256 checksum
How to use checksums
af3fd8d8c804cc0b5ce367d8cefd7bb67ec5e995ecedaaa5b960f446a94983b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / fdc-1.17-cp312-cp312-macosx_10_12_x86_64.whl

Download URL fdc-1.17-cp312-cp312-macosx_10_12_x86_64.whl
Size 426.0 kB
Tags CPython 3.12 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
b83e17f52cdce032865cf8bfbf91aefb799ed1710db68b3a98c64de22df526dd
BLAKE2b-256 checksum
How to use checksums
1028f920c3565ff8d9e83902c1a56f1fb3c91d7ec47cfd2699adf82c00662bf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / fdc-1.17-cp311-cp311-win_amd64.whl

Download URL fdc-1.17-cp311-cp311-win_amd64.whl
Size 323.7 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
b91228f1a701f77f9acbe5c40ddb133cd19fe53f7ee86d0b881ab375f7bf3e70
BLAKE2b-256 checksum
How to use checksums
172922c4a8b3f5370b5394da01bb33ebec6c52f8228ecef7f299852bdb25bf82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / fdc-1.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL fdc-1.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 447.3 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
63f9661c66e384310a9525e4780df4cbd082d52e2b16a6e3ac92767b28bd6496
BLAKE2b-256 checksum
How to use checksums
eb275e380fbd3582b18c42a3669155f3aee49941e0f0e214959735f84bcdf7b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / fdc-1.17-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL fdc-1.17-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 425.7 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
5c79c7a3d09d040d0a5a415b310e05a7572438ba447bb36d521b16f7a4843f01
BLAKE2b-256 checksum
How to use checksums
719f790521dc947cb7ceb73204e10ce41dc561c3953db22ca52fe1449f1e5aa5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / fdc-1.17-cp311-cp311-macosx_11_0_arm64.whl

Download URL fdc-1.17-cp311-cp311-macosx_11_0_arm64.whl
Size 394.5 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1fa962dcb396b8bbe944ac395cef52ef59f9000e538e6e25bb44b6d44fb35625
BLAKE2b-256 checksum
How to use checksums
b88cccf39d43833930c6c31a8600e84a729443c85758b9b9a253e47d87d60b2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / fdc-1.17-cp311-cp311-macosx_10_12_x86_64.whl

Download URL fdc-1.17-cp311-cp311-macosx_10_12_x86_64.whl
Size 426.4 kB
Tags CPython 3.11 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
92c158b62aec21359327236f4521ecf1486fd3c80383f9ab7183447f44650ba9
BLAKE2b-256 checksum
How to use checksums
1a31319470c937d5ed9150c1550689321cd9818da0d686ceda874a56a7735a7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / fdc-1.17-cp310-cp310-win_amd64.whl

Download URL fdc-1.17-cp310-cp310-win_amd64.whl
Size 323.8 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
f48bacc66aeadd7f2e2f5c02ebfde035f81bf15a9173090f1fb7a36a24f7cc27
BLAKE2b-256 checksum
How to use checksums
daea2b8b83f0ce2b29ae2b575cf32d61a16e1be652f6dcef2ff80f5ced98e813
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / fdc-1.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL fdc-1.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 447.5 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
556a66474edef9b10aee99a67d079aff6dc359c493eea091b27664343c00e60f
BLAKE2b-256 checksum
How to use checksums
0d2314b3b8734ed7493b40e5107aac361804b3bda31a99781e54e55d8bcee4c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / fdc-1.17-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL fdc-1.17-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 426.0 kB
Tags CPython 3.10 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
331514a86cc91201bf757c60dedf797d3febe360f9860da0be92b7adbef5b2ff
BLAKE2b-256 checksum
How to use checksums
3854a68fa8406c25ff5a3a4c4d7141fe032d7000b8385d54b69836751e7de1b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / fdc-1.17-cp310-cp310-macosx_11_0_arm64.whl

Download URL fdc-1.17-cp310-cp310-macosx_11_0_arm64.whl
Size 394.7 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7ecf3e440d8cc467f7602b55e25d44c52278ddde456895bbdda657bcc0202240
BLAKE2b-256 checksum
How to use checksums
77ea3626a15e9ff9f01acb8e774d2a76e61df8479aeffb0e33d2dd63ec563d55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / fdc-1.17-cp310-cp310-macosx_10_12_x86_64.whl

Download URL fdc-1.17-cp310-cp310-macosx_10_12_x86_64.whl
Size 426.6 kB
Tags CPython 3.10 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
2e56bd2c821e7d62e138aa37d23687bd4e9bc6628862f80f6d7be4873e4ee25b
BLAKE2b-256 checksum
How to use checksums
3362414f828b2d6180439a4aad5fce8f2c2bf0af8032b146061d37e9c8e1be7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.17 This release

16 release files

1.16

2 release files

1.15

2 release files

1.14

2 release files

1.12

2 release files

1.11

2 release files

1.1

2 release files

0.99

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page