﻿ Gaussian Structure

# Gaussian Structure

Gaussian Kernel.

Namespace:  Accord.Statistics.Kernels
Assembly:  Accord.Statistics (in Accord.Statistics.dll) Version: 3.8.0
Syntax
```[SerializableAttribute]
public struct Gaussian : IKernel, IKernel<double[]>,
IEstimable, IEstimable<double[]>, ICloneable, IReverseDistance,
IKernel<Sparse<double>>, IEstimable<Sparse<double>>,
IDistance<Sparse<double>>, IDistance<Sparse<double>, Sparse<double>>```

The Gaussian type exposes the following members.

Constructors
NameDescription
Gaussian
Constructs a new Gaussian Kernel with a given sigma value. To construct from a gamma value, use the FromGamma(Double) named constructor instead.
Top
Properties
NameDescription
Gamma
Gets or sets the gamma value for the kernel. When setting gamma, sigma gets updated accordingly (gamma = 0.5/sigma^2).
Sigma
Gets or sets the sigma value for the kernel. When setting sigma, gamma gets updated accordingly (gamma = 0.5/sigma^2).
SigmaSquared
Gets or sets the sigma² value for the kernel. When setting sigma², gamma gets updated accordingly (gamma = 0.5/sigma²).
Top
Methods
NameDescription
Clone
Creates a new object that is a copy of the current instance.
Distance(Double, Double)
Computes the squared distance in feature space between two points given in input space.
Distance(SparseDouble, SparseDouble)
Computes the squared distance in feature space between two points given in input space.
Distances(Double, Int32)
Computes the set of all distances between all points in a random subset of the data.
Distances(SparseDouble, Int32)
Computes the set of all distances between all points in a random subset of the data.
DistancesTDistance, TInput(TInput, Int32, TDistance)
Computes the set of all distances between all points in a random subset of the data.
Equals
Indicates whether this instance and a specified object are equal.
(Inherited from ValueType.)
Estimate(Double)
Estimate appropriate values for sigma given a data set.
Estimate(SparseDouble)
Estimate appropriate values for sigma given a data set.
Estimate(Double, DoubleRange)
Estimate appropriate values for sigma given a data set.
Estimate(Double, Int32)
Estimates appropriate values for sigma given a data set.
Estimate(SparseDouble, DoubleRange)
Estimate appropriate values for sigma given a data set.
Estimate(SparseDouble, Int32)
Estimates appropriate values for sigma given a data set.
Estimate(Double, Int32, DoubleRange)
Estimates appropriate values for sigma given a data set.
Estimate(SparseDouble, Int32, DoubleRange)
Estimates appropriate values for sigma given a data set.
EstimateT(T, Double)
Estimate appropriate values for sigma given a data set.
EstimateT(T, Double, DoubleRange)
Estimate appropriate values for sigma given a data set.
EstimateT(T, Double, Int32)
Estimates appropriate values for sigma given a data set.
EstimateT(T, Double, Int32, DoubleRange)
Estimates appropriate values for sigma given a data set.
EstimateTInput, TDistance(TInput, TDistance)
Estimate appropriate values for sigma given a data set.
EstimateTInput, TDistance(TInput, Int32, TDistance)
Estimates appropriate values for sigma given a data set.
EstimateTInput, TDistance(TInput, TDistance, DoubleRange)
Estimate appropriate values for sigma given a data set.
EstimateTInput, TDistance(TInput, Int32, TDistance, DoubleRange)
Estimates appropriate values for sigma given a data set.
FromGamma
Constructs a new Gaussian Kernel with a given gamma value. To construct from a sigma value, use the Gaussian(Double) constructor instead.
Function(Double)
Gaussian Kernel function.
Function(Double, Double)
Gaussian Kernel function.
Function(SparseDouble, SparseDouble)
Gaussian Kernel function.
GetHashCode
Returns the hash code for this instance.
(Inherited from ValueType.)
GetType
Gets the Type of the current instance.
(Inherited from Object.)
ReverseDistance(Double)
Computes the distance in input space given a distance computed in feature space.
ReverseDistance(Double, Double)
Computes the squared distance in input space between two points given in feature space.
ToString
Returns the fully qualified type name of this instance.
(Inherited from ValueType.)
Top
Extension Methods
NameDescription
Distance
Computes the kernel distance for a kernel function even if it doesn't implement the IDistance interface. Can be used to check the proper implementation of the distance function.
(Defined by Tools.)
HasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
IsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Top
Remarks

The Gaussian kernel requires tuning for the proper value of σ. Different approaches to this problem includes the use of brute force (i.e. using a grid-search algorithm) or a gradient ascent optimization.

References:

• P. F. Evangelista, M. J. Embrechts, and B. K. Szymanski. Some Properties of the Gaussian Kernel for One Class Learning. Available on: http://www.cs.rpi.edu/~szymansk/papers/icann07.pdf