KernelDensityEstimate.ToPiecewiseDistribution Method

Creates a finite-grid, piecewise approximation to this density.

Definition

Namespace: Numerics.NET.Statistics
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
C#
public PiecewiseDistribution ToPiecewiseDistribution(
	KernelDensityGridOptions? options = null
)

Parameters

options  KernelDensityGridOptions  (Optional)
Grid settings, or null for 512 points and three adjusted bandwidths of padding. At least three points are required.

Return Value

PiecewiseDistribution
A piecewise constant density with a piecewise linear CDF, normalized over the grid interval.

Remarks

Trapezoidal cell masses are normalized before constructing the CDF. Tails outside the grid are omitted. Choose a resolution that resolves the bandwidth. Non-Gaussian kernels require direct grid settings.

Exceptions

NotSupportedExceptionFFT controls are supplied for a non-Gaussian kernel.
ArgumentExceptionThe grid has fewer than three points, its resolved bounds or coordinates are invalid, or the sampled density is not finite, nonnegative and nonzero.

See Also