Search Results for

    Show / Hide Table of Contents

    Class AlgorithmBase

    Abstract base class for all algorithms

    Inheritance
    Object
    AlgorithmBase
    ExpectationPropagation
    GibbsSampling
    MaxProductBeliefPropagation
    VariationalMessagePassing
    Implements
    IAlgorithm
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Microsoft.ML.Probabilistic.Algorithms
    Assembly: Microsoft.ML.Probabilistic.Compiler.dll
    Syntax
    public abstract class AlgorithmBase : IAlgorithm

    Properties

    DefaultNumberOfIterations

    Default number of iterations for this algorithm

    Declaration
    public virtual int DefaultNumberOfIterations { get; set; }
    Property Value
    Type Description
    Int32

    Name

    The algorithm's name

    Declaration
    public abstract string Name { get; }
    Property Value
    Type Description
    String

    ShortName

    Short name for the inference algorithm

    Declaration
    public abstract string ShortName { get; }
    Property Value
    Type Description
    String

    Methods

    ForEachDefaultQueryType(Action<QueryType>)

    Get the default inference query types for a variable for this algorithm.

    Declaration
    public virtual void ForEachDefaultQueryType(Action<QueryType> action)
    Parameters
    Type Name Description
    Action<QueryType> action

    GetAlgorithmConversionOperator(Type, IAlgorithm, Boolean, List<Object>)

    Gets the operator which converts a message to/from another algorithm

    Declaration
    public abstract MethodReference GetAlgorithmConversionOperator(Type channelType, IAlgorithm alg2, bool isFromFactor, List<object> args)
    Parameters
    Type Name Description
    Type channelType

    Type of message

    IAlgorithm alg2

    The other algorithm

    Boolean isFromFactor

    True if from, false if to

    List<Object> args

    Where to add arguments of the operator

    Returns
    Type Description
    MethodReference

    A method reference for the operator

    GetEvidenceMethodName(List<ICompilerAttribute>)

    Gets the suffix for this algorithm's evidence method

    Declaration
    public abstract string GetEvidenceMethodName(List<ICompilerAttribute> factorAttributes)
    Parameters
    Type Name Description
    List<ICompilerAttribute> factorAttributes
    Returns
    Type Description
    String

    GetMessagePrototype(ChannelInfo, MessageDirection, IExpression, String, IList<QueryType>)

    Get the message prototype for this algorithm in the specified direction

    Declaration
    public virtual IExpression GetMessagePrototype(ChannelInfo channelInfo, MessageDirection direction, IExpression marginalPrototypeExpression, string path, IList<QueryType> queryTypes)
    Parameters
    Type Name Description
    ChannelInfo channelInfo

    The channel information

    MessageDirection direction

    The direction

    IExpression marginalPrototypeExpression

    The marginal prototype expression

    String path

    Path name of message

    IList<QueryType> queryTypes
    Returns
    Type Description
    IExpression

    GetOperatorMethodSuffix(List<ICompilerAttribute>)

    Algorithm's operator suffix - used in in message update methods

    Declaration
    public abstract string GetOperatorMethodSuffix(List<ICompilerAttribute> factorAttributes)
    Parameters
    Type Name Description
    List<ICompilerAttribute> factorAttributes
    Returns
    Type Description
    String

    GetQueryTypeBinding(QueryType)

    Get the query type binding - this is the path to the given query type relative to the raw marginal type.

    Declaration
    public virtual string GetQueryTypeBinding(QueryType qt)
    Parameters
    Type Name Description
    QueryType qt

    The query type

    Returns
    Type Description
    String

    GetVariableFactor(Boolean, Boolean)

    Declaration
    public abstract Delegate GetVariableFactor(bool derived, bool initialised)
    Parameters
    Type Name Description
    Boolean derived
    Boolean initialised
    Returns
    Type Description
    Delegate

    ModifyFactorAttributes(IExpression, AttributeRegistry<Object, ICompilerAttribute>)

    Allows the algorithm to modify the attributes on a factor. For example context-specific message attributes on a method invoke expression

    Declaration
    public virtual void ModifyFactorAttributes(IExpression factorExpression, AttributeRegistry<object, ICompilerAttribute> factorAttributes)
    Parameters
    Type Name Description
    IExpression factorExpression

    The expression

    AttributeRegistry<Object, ICompilerAttribute> factorAttributes

    Attribute registry

    Implements

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