Kernel Density

KernelDensity.jl provides kernel density estimators for Julia, including univariate density estimation.

github.com/JuliaStats/KernelDensity.jl
Kernel Density homepage screenshot

About Kernel Density

KernelDensity.jl provides kernel density estimators for Julia. It builds a UnivariateKDE from a real vector with kde(data) and a BivariateKDE from a tuple of vectors or a two-column matrix, returning gridded coordinates and density values for plotting.

It supports choice of kernel distribution, bandwidth, boundaries, grid and observation weights, plus bandwidth selection by least-squares cross-validation with kde_lscv. Intermediate values can be queried with pdf via Interpolations.jl. It uses FFTs internally, so boundaries need sufficient spacing to prevent wrap-around and npoints defaults to 2048 with power-of-2 values for optimal efficiency.

Key features

  • Univariate density estimation from real vector via kde
  • Bivariate density estimation from tuple or two-column matrix
  • Bandwidth selection by Silverman's rule or least-squares cross-validation
  • Custom kernels from Distributions.jl families
  • Observation weights via vectors or StatsBase weights
  • Interpolated density queries via pdf and InterpKDE
Best for: Julia users who need univariate or bivariate kernel density estimates for analysis or plotting.
Good for
  • Handles both univariate and bivariate data inputs
  • Supports custom kernels, grids, boundaries and observation weights
  • Allows pdf interpolation of gridded estimates, with InterpKDE for repeated queries
Watch out for
  • Requires sufficient boundary spacing to prevent FFT wrap-around
  • Non-power-of-2 npoints reduces FFT efficiency

Kernel Density at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Open source
Not stated
Language
English
Last checked
Oct 5, 2026 · Online when checked
Listed
Oct 5, 2026

Kernel Density alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 24 alternatives

Popular in Developer Tools

Well-known listings from the same topic.

All 423

Kernel Density FAQ

How do I create a univariate density estimate?
Use U = kde(data) with a real vector. The result contains gridded coordinates in U.x and the estimate in U.density.
How do I select bandwidth by least-squares cross-validation?
Use kde_lscv(data). It accepts the same keyword arguments as kde, except bandwidth.
How do I get density values between grid points?
Use pdf(k, x) for univariate or pdf(k, x, y) for bivariate. For multiple calls, construct ik = InterpKDE(k) first.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing