KernelDensity.FitReflected Method

Fits a Gaussian density with reflection boundary correction.

Definition

Namespace: Numerics.NET.Statistics
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
C#
public static KernelDensityEstimate FitReflected(
	Vector<double> input,
	Interval<double> support,
	KernelDensityOptions? options = null,
	Vector<double>? weights = null
)

Parameters

input  Vector<Double>
Nonempty finite observations inside the closed support, including zero-weight entries.
support  Interval<Double>
The closed half-line or finite-interval support.
options  KernelDensityOptions  (Optional)
Gaussian bandwidth options in original units, or null for normal-reference selection.
weights  Vector<Double>  (Optional)
Optional finite nonnegative relative masses, paired by position with positive total mass.

Return Value

KernelDensityEstimate
An immutable reflected fit owning observation and weight snapshots.

Remarks

Finite endpoints are accepted. Selection uses the original observations before reflection. Finite intervals repeatedly fold all Gaussian mass into the support, including for wide bandwidths.

Exceptions

ArgumentNullExceptionThe observations are null.
ArgumentExceptionObservations or weights are invalid, selection has insufficient spread, or the bandwidth cannot be resolved.
ArgumentOutOfRangeExceptionThe support is unordered, has no finite endpoint, contains NaN or has unrepresentable finite width.
NotSupportedExceptionThe kernel is not the built-in Gaussian kernel.

See Also