NAME
Math::Histo::KDE - 1-Dimensional Kernel Density Estimation (KDE) Engine
SYNOPSIS
use Math::Histo::KDE;
# Construct KDE from sample points
my $kde = Math::Histo::KDE->new(
samples => [1.2, 2.3, 2.5, 3.1, 4.8, 5.0],
kernel => 'gaussian', # or epanechnikov, uniform, triangular, biweight, cosine
bw_method => 'silverman', # or scott, manual
);
# Evaluate estimated probability density (PDF)
my $pdf = $kde->eval(2.5);
# Evaluate cumulative distribution (CDF)
my $cdf = $kde->cdf(2.5);
# Invert CDF for quantile
my $median = $kde->quantile(0.50);
# Generate random synthetic samples
my @samples = $kde->sample(100, 42);
# Construct directly from a Math::Histo histogram
my $h_kde = Math::Histo::KDE->from_histogram($histo);
DESCRIPTION
Math::Histo::KDE provides fast, non-parametric continuous density estimation for 1-dimensional datasets using standard kernel functions and automated bandwidth selection rules.