Kernel.LogWeight Method

Gets the natural logarithm of the normalized kernel weight.

Definition

Namespace: Numerics.NET.Statistics
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
C#
public double LogWeight(
	double x
)

Parameters

x  Double
The standardized distance.

Return Value

Double
The log weight. NaN propagates, and zero weight or a point outside the support returns negative infinity. A negative raw kernel value has an undefined logarithm and returns NaN.

Remarks

Built-in kernels and custom kernels with a logarithmic delegate avoid exponentiating the raw kernel. Without such a delegate, underflow inside the ordinary kernel function cannot be recovered.

Exceptions

InvalidOperationExceptionNumerical normalization is not finite and positive.

See Also