Click or drag to resize
Accord.NET (logo)

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[]>, 
	IRadialBasisKernel, IDistance, IDistance<double[]>, IDistance<double[], double[]>, 
	IEstimable, IEstimable<double[]>, ICloneable, IReverseDistance, 
	IKernel<Sparse<double>>, IEstimable<Sparse<double>>, 
	IDistance<Sparse<double>>, IDistance<Sparse<double>, Sparse<double>>
Request Example View Source

The Gaussian type exposes the following members.

Constructors
  NameDescription
Public methodGaussian
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
Public propertyGamma
Gets or sets the gamma value for the kernel. When setting gamma, sigma gets updated accordingly (gamma = 0.5/sigma^2).
Public propertySigma
Gets or sets the sigma value for the kernel. When setting sigma, gamma gets updated accordingly (gamma = 0.5/sigma^2).
Public propertySigmaSquared
Gets or sets the sigma² value for the kernel. When setting sigma², gamma gets updated accordingly (gamma = 0.5/sigma²).
Top
Methods
  NameDescription
Public methodClone
Creates a new object that is a copy of the current instance.
Public methodDistance(Double, Double)
Computes the squared distance in feature space between two points given in input space.
Public methodDistance(SparseDouble, SparseDouble)
Computes the squared distance in feature space between two points given in input space.
Public methodStatic memberDistances(Double, Int32)
Computes the set of all distances between all points in a random subset of the data.
Public methodStatic memberDistances(SparseDouble, Int32)
Computes the set of all distances between all points in a random subset of the data.
Public methodStatic memberDistancesTDistance, TInput(TInput, Int32, TDistance)
Computes the set of all distances between all points in a random subset of the data.
Public methodEquals
Indicates whether this instance and a specified object are equal.
(Inherited from ValueType.)
Public methodStatic memberEstimate(Double)
Estimate appropriate values for sigma given a data set.
Public methodStatic memberEstimate(SparseDouble)
Estimate appropriate values for sigma given a data set.
Public methodStatic memberEstimate(Double, DoubleRange)
Estimate appropriate values for sigma given a data set.
Public methodStatic memberEstimate(Double, Int32)
Estimates appropriate values for sigma given a data set.
Public methodStatic memberEstimate(SparseDouble, DoubleRange)
Estimate appropriate values for sigma given a data set.
Public methodStatic memberEstimate(SparseDouble, Int32)
Estimates appropriate values for sigma given a data set.
Public methodStatic memberEstimate(Double, Int32, DoubleRange)
Estimates appropriate values for sigma given a data set.
Public methodStatic memberEstimate(SparseDouble, Int32, DoubleRange)
Estimates appropriate values for sigma given a data set.
Public methodStatic memberEstimateT(T, Double)
Estimate appropriate values for sigma given a data set.
Public methodStatic memberEstimateT(T, Double, DoubleRange)
Estimate appropriate values for sigma given a data set.
Public methodStatic memberEstimateT(T, Double, Int32)
Estimates appropriate values for sigma given a data set.
Public methodStatic memberEstimateT(T, Double, Int32, DoubleRange)
Estimates appropriate values for sigma given a data set.
Public methodStatic memberEstimateTInput, TDistance(TInput, TDistance)
Estimate appropriate values for sigma given a data set.
Public methodStatic memberEstimateTInput, TDistance(TInput, Int32, TDistance)
Estimates appropriate values for sigma given a data set.
Public methodStatic memberEstimateTInput, TDistance(TInput, TDistance, DoubleRange)
Estimate appropriate values for sigma given a data set.
Public methodStatic memberEstimateTInput, TDistance(TInput, Int32, TDistance, DoubleRange)
Estimates appropriate values for sigma given a data set.
Public methodStatic memberFromGamma
Constructs a new Gaussian Kernel with a given gamma value. To construct from a sigma value, use the Gaussian(Double) constructor instead.
Public methodFunction(Double)
Gaussian Kernel function.
Public methodFunction(Double, Double)
Gaussian Kernel function.
Public methodFunction(SparseDouble, SparseDouble)
Gaussian Kernel function.
Public methodGetHashCode
Returns the hash code for this instance.
(Inherited from ValueType.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodReverseDistance(Double)
Computes the distance in input space given a distance computed in feature space.
Public methodReverseDistance(Double, Double)
Computes the squared distance in input space between two points given in feature space.
Public methodToString
Returns the fully qualified type name of this instance.
(Inherited from ValueType.)
Top
Extension Methods
  NameDescription
Public Extension MethodDistance
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.)
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodTo(Type)Overloaded.
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.)
Public Extension MethodToTOverloaded.
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

See Also