Skip to main content

Python wrapper of ParallelKDE.jl

Project description

ParallelKDEpy: Python wrapper for ParallelKDE.jl

Stable Dev Build Status

High performance implementation of a parallel kernel density estimation algorithm described in [Sustay Martinez et al. (2025)]. The algorithm is specially suited for high-dimensional data, with CPU/CUDA support.

Quick links:

Installation

pip install parallelkdypy

The wrapper will handle installing Julia and ParallelKDE.jl the first time you import it. No additional setup is required.

Quick Start

import numpy as np
import parallelkdepy as pkde

# Assume 'data' is a 2D array of points for which we want to estimate the density
data = np.random.randn(10000, 1)

density_estimation = pkde.DensityEstimation(data, grid=True, device="cpu")
density_estimation.estimate_density("gradepro")

density estimated = density_estimation.get_density()

See the documentation for more details on how to use the package.

Features

Currently, there are two estimators available:

  • "gradepro": As described in [Sustay Martinez et al. (2025)], this estimator is designed for high-dimensional data and can be run on both CPU and GPU.
  • "rot": Implements the rules of thumb (Silverman and Scott) for bandwidth selection. It makes use of some of the routines from :gradepro to evaluate the density on a grid.

Julia Package

Please keep in mind that this package is a wrapper around the Julia package ParallelKDE.jl. For more information on the Julia package, please refer to its documentation.

Citing

Please cite the following papers when using ParallelKDEpy in your work:

Known Issues

List of main known issues:

  • Issue #5: Segmentation faults for CUDA implementations

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

parallelkdepy-1.0.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

parallelkdepy-1.0.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file parallelkdepy-1.0.0.tar.gz.

File metadata

  • Download URL: parallelkdepy-1.0.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for parallelkdepy-1.0.0.tar.gz
Algorithm Hash digest
SHA256 157ae63a7b930a255be5f21a0b71a6ef6d988b9d986f78d81d001a7dc8303cd0
MD5 d729fd49d24aede49085009833fb27b1
BLAKE2b-256 d316a8d12d993e94277fdda6f716aa0a5d730bcb55dfe366ce178af9f0da0caf

See more details on using hashes here.

Provenance

The following attestation bundles were made for parallelkdepy-1.0.0.tar.gz:

Publisher: release-pypi.yml on chrissm23/ParallelKDEpy

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

File details

Details for the file parallelkdepy-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: parallelkdepy-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for parallelkdepy-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 069123c63eca22e2ecda68f11b66d9c868fc9becc50bbead9d4a5220552d54cb
MD5 0ada699183fde666625213b08bdaa2d0
BLAKE2b-256 b6854c62ec0c12235612e69de6d69e1f8189cc7339e6aacccb253d4cd6868153

See more details on using hashes here.

Provenance

The following attestation bundles were made for parallelkdepy-1.0.0-py3-none-any.whl:

Publisher: release-pypi.yml on chrissm23/ParallelKDEpy

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