SpectralDeltaKernel<T>

Models & Types · AiDotNet.Kernels

Spectral Delta Kernel representing a single spectral component.

Implements: IKernelFunction<T>

For Beginners

The Spectral Delta Kernel is a single component of the Spectral Mixture Kernel. While the SpectralMixtureKernel uses multiple frequency components, this kernel uses just one.

In mathematical terms: k(τ) = σ² × exp(-2π²τ²σ_f²) × cos(2πμτ)

Where:

  • τ = |x - x’| is the distance between points
  • σ² is the output variance (weight)
  • μ is the frequency (how fast the pattern repeats)
  • σ_f is the frequency bandwidth (how “spread” the frequency is)

Think of it as a single “note” in the spectrum:

  • μ determines the pitch (frequency)
  • σ_f determines how pure the tone is (narrow = pure, wide = noisy)
  • σ² determines the volume

This is useful when:

  • You expect a single dominant periodicity
  • You want a simple periodic pattern with decay
  • As a building block for more complex spectral kernels

Constructors

Constructor Summary
SpectralDeltaKernel(double frequency, double bandwidth, double variance) Initializes a new Spectral Delta Kernel.

Properties

Property Summary
double Bandwidth { get; } Gets the frequency bandwidth.
double Frequency { get; } Gets the mean frequency.
double Period { get; } Gets the period (1/frequency).
double Variance { get; } Gets the output variance.

Methods

Method Summary
SpectralDeltaKernel<T> FromPeriod(double period, double decayLength, double variance) Creates a Spectral Delta Kernel from a known period.
T Calculate(Vector<T> x1, Vector<T> x2) Calculates the spectral delta kernel value.
double GetPowerSpectralDensity(double f) Computes the power spectral density at a given frequency.