Search Results for

    Show / Hide Table of Contents

    Class SummationKernel

    Summation kernel. This provides the management layer for adding together different kernels

    Inheritance
    Object
    KernelFunction
    SummationKernel
    Implements
    IKernelFunctionWithParams
    IKernelFunction
    Inherited Members
    KernelFunction.thetaNames
    KernelFunction.thetaValues
    KernelFunction.thetaName2Index
    KernelFunction.HyperNames
    KernelFunction.EvaluateX1X2(Vector, Vector)
    KernelFunction.EvaluateX1X2(Vector, Vector, Vector)
    KernelFunction.EvaluateX(Vector)
    KernelFunction.EvaluateX(Vector, Vector)
    KernelFunction.NameToIndex(String)
    KernelFunction.IndexToName(Int32)
    KernelFunction.Cholesky(IKernelFunction, Dictionary<Int32, Vector>)
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Namespace: Microsoft.ML.Probabilistic.Distributions.Kernels
    Assembly: Microsoft.ML.Probabilistic.dll
    Syntax
    [Serializable]
    public class SummationKernel : KernelFunction, IKernelFunctionWithParams, IKernelFunction

    Constructors

    SummationKernel()

    Default constructor

    Declaration
    public SummationKernel()

    SummationKernel(IKernelFunctionWithParams)

    Constructs summation kernel from an initial kernel function

    Declaration
    public SummationKernel(IKernelFunctionWithParams kernel)
    Parameters
    Type Name Description
    IKernelFunctionWithParams kernel

    SummationKernel(List<IKernelFunctionWithParams>)

    Declaration
    [Construction(new string[]{"Kernels"})]
    public SummationKernel(List<IKernelFunctionWithParams> kernels)
    Parameters
    Type Name Description
    List<IKernelFunctionWithParams> kernels

    Fields

    indexInKernel

    Index of a hyper-parameter within a participating kernel

    Declaration
    protected int[] indexInKernel
    Field Value
    Type Description
    Int32[]

    indexOfKernel

    Index of the kernel to which the hyper-parameter belongs

    Declaration
    protected int[] indexOfKernel
    Field Value
    Type Description
    Int32[]

    kernels

    List of kernels in the summation

    Declaration
    protected List<IKernelFunctionWithParams> kernels
    Field Value
    Type Description
    List<IKernelFunctionWithParams>

    thetaCount

    Parameter counts of the individual kernels

    Declaration
    protected int[] thetaCount
    Field Value
    Type Description
    Int32[]

    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

    parameter index

    Property Value
    Type Description
    Double
    Overrides
    KernelFunction.Item[Int32]

    Item[String]

    Set or get hyper-parameter by name. This indexer is not over-rideable

    Declaration
    public override double this[string name] { get; set; }
    Parameters
    Type Name Description
    String name

    Mame of the hyper-parameter

    Property Value
    Type Description
    Double

    The hyper-parameter value

    Overrides
    KernelFunction.Item[String]

    Kernels

    The participating kernels

    Declaration
    public virtual IList<IKernelFunctionWithParams> Kernels { get; }
    Property Value
    Type Description
    IList<IKernelFunctionWithParams>

    ThetaCount

    Number of theta parameters

    Declaration
    public override int ThetaCount { get; }
    Property Value
    Type Description
    Int32
    Overrides
    KernelFunction.ThetaCount

    TypeVersion

    The static version for the derived class

    Declaration
    public override int TypeVersion { get; }
    Property Value
    Type Description
    Int32
    Overrides
    KernelFunction.TypeVersion

    Methods

    buildMaps()

    Helper method for building maps between container and containees

    Declaration
    protected void buildMaps()

    clearMaps()

    Clear maps between container and containees

    Declaration
    protected void clearMaps()

    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
    KernelFunction.EvaluateX(Vector, ref Vector, ref Vector)

    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
    KernelFunction.EvaluateX1X2(Vector, Vector, ref Vector, ref Vector)

    initialise()

    (Re-)initialise a summation kernel. This clears all participating kernels

    Declaration
    protected void initialise()

    Read(StreamReader)

    Reads the function parameters in from a stream

    Declaration
    public override void Read(StreamReader sr)
    Parameters
    Type Name Description
    StreamReader sr

    Stream reader

    Overrides
    KernelFunction.Read(StreamReader)

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    Object.ToString()

    Write(StreamWriter)

    Writes the function parameters out to a stream

    Declaration
    public override void Write(StreamWriter sw)
    Parameters
    Type Name Description
    StreamWriter sw

    Stream writer

    Overrides
    KernelFunction.Write(StreamWriter)

    Operators

    Addition(SummationKernel, IKernelFunctionWithParams)

    Adds two kernel functions

    Declaration
    public static SummationKernel operator +(SummationKernel kernelA, IKernelFunctionWithParams kernelB)
    Parameters
    Type Name Description
    SummationKernel kernelA
    IKernelFunctionWithParams kernelB
    Returns
    Type Description
    SummationKernel

    Implements

    IKernelFunctionWithParams
    IKernelFunction
    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.