KernelDensityEstimate Class

Represents a reusable univariate kernel density estimate fitted to a snapshot of observations.

Definition

Namespace: Numerics.NET.Statistics
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
C#
public sealed class KernelDensityEstimate
Inheritance
Object  →  KernelDensityEstimate

Remarks

Use Fit(Vector<Double>, KernelDensityOptions, Vector<Double>) to create an estimate. Observations are copied and sorted once; bandwidth selection and kernel normalization are completed during fitting. Relative weights, when supplied, are snapshotted by observation position. Zero-weight entries are ignored. Later changes to the source vectors do not affect the estimate. Concurrent evaluation is supported when the custom kernel delegate, if any, is stable and safe for concurrent calls. Do not modify query vectors while they are being evaluated.

Properties

BandwidthGets the adjusted bandwidth used for evaluation, in observation units.
BandwidthAdjustmentGets the factor applied to UnadjustedBandwidth.
BandwidthEstimatorGets the selection rule, or Custom for a supplied bandwidth.
BandwidthSearchLowerBoundGets the resolved bandwidth-search lower bound before adjustment, or null for a method without a search.
BandwidthSearchUpperBoundGets the resolved bandwidth-search upper bound before adjustment, or null for a method without a search.
BandwidthSelectionAtBoundaryGets whether bandwidth selection returned an endpoint of its search interval.
EffectiveSampleSizeGets the effective sample size, 1 / sum of squared normalized observation masses.
HasWeightsGets whether a weight vector was supplied when fitting.
KernelGets the kernel used for evaluation.
PositiveWeightCountGets the number of observations with positive mass, excluding zero-weight entries.
SampleCountGets the number of supplied observations, including zero-weight entries.
UnadjustedBandwidthGets the supplied or selected bandwidth before adjustment, in observation units.

Methods

EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Evaluate(Double)Evaluates the fitted density at a point.
Evaluate(Vector<Double>)Evaluates the fitted density at a collection of points.
EvaluateGridEvaluates the fitted density on an equally spaced grid.
EvaluateLog(Double)Evaluates the natural logarithm of the fitted density at a point.
EvaluateLog(Vector<Double>)Evaluates natural log-density at a collection of query points.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
ToDistributionCreates the direct probability distribution represented by this fitted Gaussian KDE.
ToPiecewiseDistributionCreates a finite-grid, piecewise approximation to this density.
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also