KernelDensityOptions.Automatic Method

Creates options that select a bandwidth from the observations.

Definition

Namespace: Numerics.NET.Statistics
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
C#
public static KernelDensityOptions Automatic(
	KernelDensityBandwidthEstimator bandwidthEstimator = KernelDensityBandwidthEstimator.NormalReference,
	Kernel? kernel = null,
	double bandwidthAdjustment = 1
)

Parameters

bandwidthEstimator  KernelDensityBandwidthEstimator  (Optional)
The selection rule. The default is normal reference.
kernel  Kernel  (Optional)
The kernel, or null to use the Gaussian kernel.
bandwidthAdjustment  Double  (Optional)
A finite positive multiplier for the selected bandwidth. The default is 1.

Return Value

KernelDensityOptions
Immutable automatic bandwidth options.

Remarks

The Gaussian plug-in, Sheather-Jones and cross-validation rules require the built-in Gaussian kernel and use quadratic work per pair-sum evaluation. Default cross-validation bounds are 1/16 to 16 times the normal-reference width. Fit metadata reports resolved bounds and boundary hits. Use CrossValidated(Double, Double, Double) for explicit cross-validation bounds. Sheather-Jones expands its default root bracket when needed; use SheatherJones(Double, Double, Double) to supply a fixed root bracket.

Exceptions

NotSupportedExceptionAn advanced Gaussian selector is requested with another kernel.
ArgumentOutOfRangeExceptionThe rule is not an automatic selection rule, or the adjustment is not finite and positive.

See Also