Skip to main content

Fast Density Clustering in low-dimension

Project description

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

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

fdc-1.17.tar.gz (6.7 MB view details)

Uploaded Source

Built Distributions

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

fdc-1.17-cp312-cp312-win_amd64.whl (324.5 kB view details)

Uploaded CPython 3.12Windows x86-64

fdc-1.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (446.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

fdc-1.17-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (423.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

fdc-1.17-cp312-cp312-macosx_11_0_arm64.whl (394.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

fdc-1.17-cp312-cp312-macosx_10_12_x86_64.whl (426.0 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

fdc-1.17-cp311-cp311-win_amd64.whl (323.7 kB view details)

Uploaded CPython 3.11Windows x86-64

fdc-1.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (447.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

fdc-1.17-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (425.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

fdc-1.17-cp311-cp311-macosx_11_0_arm64.whl (394.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

fdc-1.17-cp311-cp311-macosx_10_12_x86_64.whl (426.4 kB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

fdc-1.17-cp310-cp310-win_amd64.whl (323.8 kB view details)

Uploaded CPython 3.10Windows x86-64

fdc-1.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (447.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

fdc-1.17-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (426.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

fdc-1.17-cp310-cp310-macosx_11_0_arm64.whl (394.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

fdc-1.17-cp310-cp310-macosx_10_12_x86_64.whl (426.6 kB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

Details for the file fdc-1.17.tar.gz.

File metadata

  • Download URL: fdc-1.17.tar.gz
  • Upload date:
  • Size: 6.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fdc-1.17.tar.gz
Algorithm Hash digest
SHA256 8e84d4926aefdd3f7c37066c4765eee167aa68a6028b9f599a4bd8188e66626e
MD5 6171dffc66a5fbe6c55cab3d89ac7ec3
BLAKE2b-256 70897a9db30584cb75cbbe261d324dac920caf5c1aac828bdf21e5053526ba9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for fdc-1.17.tar.gz:

Publisher: publish.yml on alexandreday/fast_density_clustering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fdc-1.17-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: fdc-1.17-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 324.5 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fdc-1.17-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 49d364950c57381f46de94bf2db1b0d04afed47ca748f6f972bf9c2ab1dfb610
MD5 115fee98bbe5754a4f7edb9a868b3434
BLAKE2b-256 5f68b0d0eae3d3c813aee8e1fa5e8866cabb203af41b814a4028513ffad6bfc7

See more details on using hashes here.

Provenance

The following attestation bundles were made for fdc-1.17-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on alexandreday/fast_density_clustering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fdc-1.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fdc-1.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 100a09457bf23befcc14373b6d5c5847cc22ec21808c9b09dd865e107d73f3ed
MD5 17c3385fc4348e2ced855a768987b8ff
BLAKE2b-256 e80f04b90d0147dfa3a602001d842a5ef1b0295f9412ff78e01bd0e38132cf78

See more details on using hashes here.

Provenance

The following attestation bundles were made for fdc-1.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on alexandreday/fast_density_clustering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fdc-1.17-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fdc-1.17-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ea6e7000da6882d0ab3d076e6ecaf1819da8f31db9fcd0db6c8c15bb097e64de
MD5 3010843bc4818993b0333be212fbfe81
BLAKE2b-256 bc28d4326c5307a8f3415aed57ec39585f0297f2e27ed3ec90ea34bbb840a23f

See more details on using hashes here.

Provenance

The following attestation bundles were made for fdc-1.17-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: publish.yml on alexandreday/fast_density_clustering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fdc-1.17-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

  • Download URL: fdc-1.17-cp312-cp312-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 394.2 kB
  • Tags: CPython 3.12, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fdc-1.17-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e4cfbd8dfe50a164ea3d1010179812f14ca6a7915c9fdbd0a5cdbcd9eba84379
MD5 e9dadd24efa4c2f24d1c25b492b76d4b
BLAKE2b-256 af3fd8d8c804cc0b5ce367d8cefd7bb67ec5e995ecedaaa5b960f446a94983b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for fdc-1.17-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yml on alexandreday/fast_density_clustering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fdc-1.17-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: fdc-1.17-cp312-cp312-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 426.0 kB
  • Tags: CPython 3.12, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fdc-1.17-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b83e17f52cdce032865cf8bfbf91aefb799ed1710db68b3a98c64de22df526dd
MD5 d1b6805f6c45dd056f9a1bd793064196
BLAKE2b-256 1028f920c3565ff8d9e83902c1a56f1fb3c91d7ec47cfd2699adf82c00662bf7

See more details on using hashes here.

Provenance

The following attestation bundles were made for fdc-1.17-cp312-cp312-macosx_10_12_x86_64.whl:

Publisher: publish.yml on alexandreday/fast_density_clustering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fdc-1.17-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: fdc-1.17-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 323.7 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fdc-1.17-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b91228f1a701f77f9acbe5c40ddb133cd19fe53f7ee86d0b881ab375f7bf3e70
MD5 d92d4b6456d7c5d0424bd9dea338222d
BLAKE2b-256 172922c4a8b3f5370b5394da01bb33ebec6c52f8228ecef7f299852bdb25bf82

See more details on using hashes here.

Provenance

The following attestation bundles were made for fdc-1.17-cp311-cp311-win_amd64.whl:

Publisher: publish.yml on alexandreday/fast_density_clustering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fdc-1.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fdc-1.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 63f9661c66e384310a9525e4780df4cbd082d52e2b16a6e3ac92767b28bd6496
MD5 9f7b60e93049993c1384abce37b9e5b2
BLAKE2b-256 eb275e380fbd3582b18c42a3669155f3aee49941e0f0e214959735f84bcdf7b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for fdc-1.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on alexandreday/fast_density_clustering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fdc-1.17-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fdc-1.17-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5c79c7a3d09d040d0a5a415b310e05a7572438ba447bb36d521b16f7a4843f01
MD5 0dc47c0572d9e1e29b0862c34bda9303
BLAKE2b-256 719f790521dc947cb7ceb73204e10ce41dc561c3953db22ca52fe1449f1e5aa5

See more details on using hashes here.

Provenance

The following attestation bundles were made for fdc-1.17-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: publish.yml on alexandreday/fast_density_clustering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fdc-1.17-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

  • Download URL: fdc-1.17-cp311-cp311-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 394.5 kB
  • Tags: CPython 3.11, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fdc-1.17-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1fa962dcb396b8bbe944ac395cef52ef59f9000e538e6e25bb44b6d44fb35625
MD5 8080feafa943acceb9358a1dd30c6ac2
BLAKE2b-256 b88cccf39d43833930c6c31a8600e84a729443c85758b9b9a253e47d87d60b2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for fdc-1.17-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on alexandreday/fast_density_clustering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fdc-1.17-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: fdc-1.17-cp311-cp311-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 426.4 kB
  • Tags: CPython 3.11, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fdc-1.17-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 92c158b62aec21359327236f4521ecf1486fd3c80383f9ab7183447f44650ba9
MD5 fe957992313c5a61cdef1fa7eca43443
BLAKE2b-256 1a31319470c937d5ed9150c1550689321cd9818da0d686ceda874a56a7735a7b

See more details on using hashes here.

Provenance

The following attestation bundles were made for fdc-1.17-cp311-cp311-macosx_10_12_x86_64.whl:

Publisher: publish.yml on alexandreday/fast_density_clustering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fdc-1.17-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: fdc-1.17-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 323.8 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fdc-1.17-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f48bacc66aeadd7f2e2f5c02ebfde035f81bf15a9173090f1fb7a36a24f7cc27
MD5 91d61c374fcb2c22b8022edb7e66a33b
BLAKE2b-256 daea2b8b83f0ce2b29ae2b575cf32d61a16e1be652f6dcef2ff80f5ced98e813

See more details on using hashes here.

Provenance

The following attestation bundles were made for fdc-1.17-cp310-cp310-win_amd64.whl:

Publisher: publish.yml on alexandreday/fast_density_clustering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fdc-1.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fdc-1.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 556a66474edef9b10aee99a67d079aff6dc359c493eea091b27664343c00e60f
MD5 c4896f35fec60ef80406fce24c75ba75
BLAKE2b-256 0d2314b3b8734ed7493b40e5107aac361804b3bda31a99781e54e55d8bcee4c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for fdc-1.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on alexandreday/fast_density_clustering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fdc-1.17-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fdc-1.17-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 331514a86cc91201bf757c60dedf797d3febe360f9860da0be92b7adbef5b2ff
MD5 0dff596efa71800bed871fbda2715cb7
BLAKE2b-256 3854a68fa8406c25ff5a3a4c4d7141fe032d7000b8385d54b69836751e7de1b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for fdc-1.17-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: publish.yml on alexandreday/fast_density_clustering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fdc-1.17-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

  • Download URL: fdc-1.17-cp310-cp310-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 394.7 kB
  • Tags: CPython 3.10, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fdc-1.17-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7ecf3e440d8cc467f7602b55e25d44c52278ddde456895bbdda657bcc0202240
MD5 c483d4467692ecae0395c17b5edb6761
BLAKE2b-256 77ea3626a15e9ff9f01acb8e774d2a76e61df8479aeffb0e33d2dd63ec563d55

See more details on using hashes here.

Provenance

The following attestation bundles were made for fdc-1.17-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish.yml on alexandreday/fast_density_clustering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fdc-1.17-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: fdc-1.17-cp310-cp310-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 426.6 kB
  • Tags: CPython 3.10, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fdc-1.17-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2e56bd2c821e7d62e138aa37d23687bd4e9bc6628862f80f6d7be4873e4ee25b
MD5 3881772f7108241d2643d6ce73f7f5f0
BLAKE2b-256 3362414f828b2d6180439a4aad5fce8f2c2bf0af8032b146061d37e9c8e1be7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for fdc-1.17-cp310-cp310-macosx_10_12_x86_64.whl:

Publisher: publish.yml on alexandreday/fast_density_clustering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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