Interface IKernelFunctionWithParams
Interface for Kernel functions with parameters
Namespace: Microsoft.ML.Probabilistic.Distributions.Kernels
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
public interface IKernelFunctionWithParams : IKernelFunction
Properties
Item[Int32]
Sets or gets a log hyper-parameter by index
Declaration
double this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | Index of the log hyper-parameter |
Property Value
Type | Description |
---|---|
Double | The log hyper-parameter value |
Item[String]
Sets or gets a log hyper-parameter by name
Declaration
double this[string name] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
String | name | Name of the hyper-parameter |
Property Value
Type | Description |
---|---|
Double | The log hyper-parameter value |
ThetaCount
Hyper-parameter count
Declaration
int ThetaCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
TypeVersion
The version for the derived class
Declaration
int TypeVersion { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
EvaluateX(Vector, ref Vector)
Evaluates the kernel for a single vector, and optionally, returns the derivatives with respect to the parameters
Declaration
double EvaluateX(Vector x, ref Vector logThetaDeriv)
Parameters
Type | Name | Description |
---|---|---|
Vector | x | Vector |
Vector | logThetaDeriv | Derivative of the kernel value with respect to the log hyper-parameters |
Returns
Type | Description |
---|---|
Double |
EvaluateX(Vector, ref Vector, ref Vector)
Evaluates the kernel for a single vector, and optionally, returns the derivatives with respect to the vector and with respect to the parameters
Declaration
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 |
EvaluateX1X2(Vector, Vector, ref Vector)
Evaluates the kernel for a pair of vectors and, optionally, returns derivatives with respect to the parameters
Declaration
double EvaluateX1X2(Vector x1, Vector x2, ref Vector logThetaDeriv)
Parameters
Type | Name | Description |
---|---|---|
Vector | x1 | First vector |
Vector | x2 | Second vector |
Vector | logThetaDeriv | Derivative of the kernel value with respect to the log hyper-parameters |
Returns
Type | Description |
---|---|
Double |
EvaluateX1X2(Vector, Vector, ref Vector, ref Vector)
Evaluates the kernel for a pair of vectors and, optionally, returns derivatives with respect to each vector, and with respect to the parameters
Declaration
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 |
IndexToName(Int32)
Gets the name of a specified hyperparameter index
Declaration
string IndexToName(int thetaIndex)
Parameters
Type | Name | Description |
---|---|---|
Int32 | thetaIndex | The hyper-parameter index |
Returns
Type | Description |
---|---|
String | The name |
NameToIndex(String)
Gets the index of a specified hyperparameter name
Declaration
int NameToIndex(string thetaName)
Parameters
Type | Name | Description |
---|---|---|
String | thetaName | The hyper-parameter name |
Returns
Type | Description |
---|---|
Int32 | The index |
Read(StreamReader)
Reads the function parameters in from a stream
Declaration
void Read(StreamReader sr)
Parameters
Type | Name | Description |
---|---|---|
StreamReader | sr | String Reader |
Write(StreamWriter)
Writes the function parameters out to a stream
Declaration
void Write(StreamWriter sw)
Parameters
Type | Name | Description |
---|---|---|
StreamWriter | sw | String Writer |