KernelDensity.EstimateGaussian Method

Definition

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

Overload List

EstimateGaussian(Vector<Double>, Vector<Double>, Nullable<Double>)Estimates densities at the supplied points using a Gaussian kernel.
EstimateGaussian(Vector<Double>, Double, Nullable<Double>)Estimates the density at one point using a Gaussian kernel.

EstimateGaussian(Vector<Double>, Vector<Double>, Nullable<Double>)

Estimates densities at the supplied points using a Gaussian kernel.
C#
public static Vector<double> EstimateGaussian(
	Vector<double> input,
	Vector<double> values,
	double? bandwidth = null
)

Parameters

input  Vector<Double>
Nonempty finite observations with equal weights.
values  Vector<Double>
Query coordinates in any order, including an empty vector.
bandwidth  Nullable<Double>  (Optional)
A finite positive width in observation units, or null to select the Gaussian normal-reference width.

Return Value

Vector<Double>
A new vector of densities in query order, preserving the query labels. NaN queries produce NaN; infinite queries produce zero.

Remarks

Inputs are not modified. Do not modify observations or queries during evaluation. Automatic selection requires at least two observations with positive spread; single or constant observations require an explicit width. Densities are evaluated directly and are not renormalized over the query coordinates.

Exceptions

ArgumentNullExceptionThe observations or queries are null.
ArgumentExceptionThe observations are empty or nonfinite, or the automatic width has no representable positive scale.
ArgumentOutOfRangeExceptionAn explicit bandwidth is not finite and positive.

EstimateGaussian(Vector<Double>, Double, Nullable<Double>)

Estimates the density at one point using a Gaussian kernel.
C#
public static double EstimateGaussian(
	Vector<double> input,
	double value,
	double? bandwidth = null
)

Parameters

input  Vector<Double>
Nonempty finite observations with equal weights.
value  Double
The coordinate at which to estimate the density.
bandwidth  Nullable<Double>  (Optional)
A finite positive width in observation units, or null to select the Gaussian normal-reference width.

Return Value

Double
The density, NaN for a NaN query, or zero for an infinite query.

Remarks

See the vector-query overload for the full input and bandwidth contract.

See Also