KernelDensityEstimate.EvaluateGrid Method

Definition

Namespace: Numerics.NET.Statistics.KernelDensityEstimation
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0

Overload List

EvaluateGrid(Int32, Nullable<Double>, Nullable<Double>, Double)Evaluates the fitted density directly on an equally spaced grid.
EvaluateGrid(KernelDensityFftOptions, Int32, Nullable<Double>, Nullable<Double>, Double)Evaluates the fitted density on an equally spaced grid.

EvaluateGrid(Int32, Nullable<Double>, Nullable<Double>, Double)

Evaluates the fitted density directly on an equally spaced grid.
C#
public KernelDensityGrid EvaluateGrid(
	int pointCount = 512,
	double? lowerBound = null,
	double? upperBound = null,
	double padding = 3
)

Parameters

pointCount  Int32  (Optional)
The output point count, including both endpoints. At least 2 are required for evaluation and 3 for a distribution. The default is 512.
lowerBound  Nullable<Double>  (Optional)
The finite lower evaluation bound, or null to use the fitted data and padding.
upperBound  Nullable<Double>  (Optional)
The finite upper evaluation bound, or null to use the fitted data and padding.
padding  Double  (Optional)
Finite nonnegative padding in adjusted fitting-coordinate bandwidths for unspecified bounds. The default is 3.

Return Value

KernelDensityGrid
Explicit coordinates, density values and fit metadata. Both result vectors are caller-owned.

Remarks

Grid bounds affect evaluation only. Density values are not renormalized over the grid. Direct evaluation is the default. The overload accepting KernelDensityFftOptions explicitly requests a Gaussian FFT approximation for ordinary fits, with resolution, truncation and workspace controls. No fallback is performed. For reflected fits, unspecified finite sides use the closed support endpoints. For transformed fits, default padded fitting-coordinate bounds are mapped back to original coordinates; supply explicit finite bounds if this overflows or produces coincident coordinates.

Exceptions

NotSupportedExceptionFFT controls are supplied for a corrected fit or a kernel other than the built-in Gaussian kernel.
ArgumentExceptionThe resolved bounds do not have a finite positive difference, the requested coordinates cannot be represented as distinct values, or FFT geometry exceeds the workspace limit or representable resolution.
ArgumentOutOfRangeExceptionThe point count, an explicit bound or padding is invalid.

EvaluateGrid(KernelDensityFftOptions, Int32, Nullable<Double>, Nullable<Double>, Double)

Evaluates the fitted density on an equally spaced grid.
C#
public KernelDensityGrid EvaluateGrid(
	KernelDensityFftOptions? fftOptions,
	int pointCount = 512,
	double? lowerBound = null,
	double? upperBound = null,
	double padding = 3
)

Parameters

fftOptions  KernelDensityFftOptions
Explicit Gaussian FFT controls, or null for direct evaluation.
pointCount  Int32  (Optional)
The output point count, including both endpoints. At least 2 are required for evaluation and 3 for a distribution. The default is 512.
lowerBound  Nullable<Double>  (Optional)
The finite lower evaluation bound, or null to use the fitted data and padding.
upperBound  Nullable<Double>  (Optional)
The finite upper evaluation bound, or null to use the fitted data and padding.
padding  Double  (Optional)
Finite nonnegative padding in adjusted fitting-coordinate bandwidths for unspecified bounds. The default is 3.

Return Value

KernelDensityGrid
Explicit coordinates, density values and fit metadata. Both result vectors are caller-owned.

Remarks

Grid bounds affect evaluation only. Density values are not renormalized over the grid. Direct evaluation is the default. The overload accepting KernelDensityFftOptions explicitly requests a Gaussian FFT approximation for ordinary fits, with resolution, truncation and workspace controls. No fallback is performed. For reflected fits, unspecified finite sides use the closed support endpoints. For transformed fits, default padded fitting-coordinate bounds are mapped back to original coordinates; supply explicit finite bounds if this overflows or produces coincident coordinates.

Exceptions

NotSupportedExceptionFFT controls are supplied for a corrected fit or a kernel other than the built-in Gaussian kernel.
ArgumentExceptionThe resolved bounds do not have a finite positive difference, the requested coordinates cannot be represented as distinct values, or FFT geometry exceeds the workspace limit or representable resolution.
ArgumentOutOfRangeExceptionThe point count, an explicit bound or padding is invalid.

See Also