KernelDensityEstimate Class

Represents an immutable fitted univariate kernel density estimate.

Definition

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

Remarks

Created by KernelDensity.Fit, FitReflected or FitTransformed. Observations and weights are copied when fitting. Queries, densities and grids use original coordinates. Bandwidths and bandwidth-selection metadata use fitting coordinates: original units for ordinary and reflected fits, and latent units for transformed fits. Custom kernels must be stable and safe for concurrent evaluation.

Reflection uses closed support endpoints; transformed observations must lie strictly inside the declared bounds. Direct distribution conversion requires the built-in Gaussian kernel. FFT grids are available only for ordinary Gaussian fits and must be requested explicitly.

Properties

BandwidthGets the adjusted bandwidth used for evaluation, in fitting coordinates.
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.
ReflectionSupportGets the reflection support, or null when no reflection is used.
SampleCountGets the number of supplied observations, including zero-weight entries.
SupportGets the declared original-coordinate support bounds.
TransformationGets the transformation used for fitting, or null for ordinary or reflected estimates.
UnadjustedBandwidthGets the supplied or selected bandwidth before adjustment, in fitting coordinates.

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.
EvaluateGrid(Int32, Nullable<Double>, Nullable<Double>, Double)Evaluates the fitted density directly on an equally spaced grid.
EvaluateGrid(KernelDensityFftOptions, Int32, Nullable<Double>, Nullable<Double>, Double)Evaluates 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 Gaussian KDE.
ToPiecewiseDistribution(Int32, Nullable<Double>, Nullable<Double>, Double)Creates a finite-grid piecewise approximation using direct evaluation.
ToPiecewiseDistribution(KernelDensityFftOptions, Int32, Nullable<Double>, Nullable<Double>, Double)Creates a finite-grid, piecewise approximation to this density.
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also