Class SquaredExponential
Squared Exponential kernel function: k(x,y) = exp(-0.5*(x-y)^2/exp(2*logLength))
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Distributions.Kernels
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[Serializable]
[DataContract]
public class SquaredExponential : KernelFunction, IKernelFunctionWithParams, IKernelFunction
Constructors
SquaredExponential()
Constructs the kernel k(x,y) = exp(- 0.5*(x-y)^2)
Declaration
public SquaredExponential()
SquaredExponential(Double)
Constructs the kernel k(x,y) = exp(- 0.5*(x-y)^2/exp(2*logLength))
Declaration
public SquaredExponential(double logLengthScale)
Parameters
Type | Name | Description |
---|---|---|
Double | logLengthScale |
SquaredExponential(Double, Double)
Constructs the kernel k(x,y) = exp(2logSignalSD - 0.5(x-y)^2/exp(2*logLength))
Declaration
[Construction(new string[]{"LogLengthScale", "LogSignalSD"})]
public SquaredExponential(double logLengthScale, double logSignalSD)
Parameters
Type | Name | Description |
---|---|---|
Double | logLengthScale | Log length |
Double | logSignalSD | Log signal variance |
Properties
Item[Int32]
Sets or gets a log hyper-parameter by index
Declaration
public override double this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
Int32 | index |
Property Value
Type | Description |
---|---|
Double |
Overrides
LogLengthScale
Sets/gets log of the length scale
Declaration
public double LogLengthScale { get; set; }
Property Value
Type | Description |
---|---|
Double |
LogSignalSD
Gets/sets log of the signal variance
Declaration
public double LogSignalSD { get; set; }
Property Value
Type | Description |
---|---|
Double |
TypeVersion
The static version for the derived class
Declaration
public override int TypeVersion { get; }
Property Value
Type | Description |
---|---|
Int32 |
Overrides
Methods
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
EvaluateX(Vector, ref Vector, ref Vector)
Evaluates the kernel for a single vector (which is used for both slots)
Declaration
public override double EvaluateX(Vector x, ref Vector xDeriv, ref Vector logThetaDeriv)
Parameters
Type | Name | Description |
---|---|---|
Vector | x | Vector |
Vector | xDeriv | Derivative of the kernel value with respect to x |
Vector | logThetaDeriv | Derivative of the kernel value with respect to the log hyper-parameters |
Returns
Type | Description |
---|---|
Double |
Overrides
EvaluateX1X2(Vector, Vector, ref Vector, ref Vector)
Evaluates the kernel for a pair of vectors
Declaration
public override double EvaluateX1X2(Vector x1, Vector x2, ref Vector x1Deriv, ref Vector logThetaDeriv)
Parameters
Type | Name | Description |
---|---|---|
Vector | x1 | First vector |
Vector | x2 | Second vector |
Vector | x1Deriv | Derivative of the kernel value with respect to x1 input vector |
Vector | logThetaDeriv | Derivative of the kernel value with respect to the log hyper-parameters |
Returns
Type | Description |
---|---|
Double |
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
Operators
Equality(SquaredExponential, SquaredExponential)
Checks if left
object is equal to right
.
Declaration
public static bool operator ==(SquaredExponential left, SquaredExponential right)
Parameters
Type | Name | Description |
---|---|---|
SquaredExponential | left | |
SquaredExponential | right |
Returns
Type | Description |
---|---|
Boolean |
Inequality(SquaredExponential, SquaredExponential)
Checks if left
object is equal to right
.
Declaration
public static bool operator !=(SquaredExponential left, SquaredExponential right)
Parameters
Type | Name | Description |
---|---|---|
SquaredExponential | left | |
SquaredExponential | right |
Returns
Type | Description |
---|---|
Boolean |