Click or drag to resize
InferenceEngine Class
Microsoft Research
An inference engine, used to perform inference tasks in Infer.NET.
Inheritance Hierarchy
SystemObject
  MicrosoftResearch.InferInferenceEngine

Namespace: MicrosoftResearch.Infer
Assembly: Infer.Compiler (in Infer.Compiler.dll) Version: 2.6.41128.1 (2.6.41128.1)
Syntax
public class InferenceEngine : SettableTo<InferenceEngine>

The InferenceEngine type exposes the following members.

Constructors
  NameDescription
Public methodInferenceEngine
Creates an inference engine which uses the default inference algorithm (currently this is expectation propagation).
Public methodInferenceEngine(IAlgorithm)
Creates an inference engine which uses the specified inference algorithm.
Top
Methods
  NameDescription
Public methodStatic memberGetBuiltInAlgorithms
Returns an array of the built-in inference algorithms.
Public methodGetCodeToInfer
Get the abstract syntax tree for the generated code.
Public methodGetCompiledInferenceAlgorithm
Returns a compiled algorithm which can later be used to infer marginal distributions for the specified variables. This method allows more fine-grained control over the inference procedure.
Public methodGetOutputMessageDistribution
Computes the output message (message to the prior) for the specified variable.
Public methodGetRelevantModelExpressions
For advanced use. Returns all the model expressions that are relevant to inferring the set of variables provided. This may be useful for constructing visualisations of the model.
Public methodGroup
Add a variable group
Public methodInfer(IVariable)
Infers the marginal distribution for the specified variable.
Public methodInfer(IVariable, QueryType)
Performs an inference query for the specified variable, given a query type.
Public methodInferTReturn(IVariable)
Infers the marginal distribution for the specified variable.
Public methodInferTReturn(IVariable, QueryType)
Infers the marginal distribution for the specified variable, and the specified query type
Public methodSetTo
Configures this inference engine by copying the settings from the supplied inference engine.
Public methodStatic memberShowFactorManager(Boolean)
Shows the factor manager, indicating which factors are available in Infer.NET and which are supported for each built-in inference algorithm.
Public methodStatic memberShowFactorManager(Boolean, IAlgorithm)
Shows the factor manager, indicating which factors are available in Infer.NET and which are supported for the supplied list of inference algorithms.
Top
Fields
  NameDescription
Public fieldStatic memberDefaultEngine
Default inference engine whose settings will be copied onto newly created engines.
Top
Properties
  NameDescription
Public propertyAlgorithm
The default inference algorithm to use. This can be overridden for individual variables or factors using the Algorithm attribute.
Public propertyCompiler
The model compiler that this inference engine uses.
Public propertyGroups
List of groups
Public propertyModelName
Model name, used when naming generated classes.
Public propertyStatic memberName
The full name of the inference engine, including version
Public propertyNumberOfIterations
The number of iterations to use when executing the compiled inference algorithm.
Public propertyOptimiseForVariables
The variables to optimize the engine to infer. If set to a list of variables, only the specified variables can be inferred by this engine. If set to null, any variable can be inferred by this engine.
Public propertyResetOnObservedValueChanged
If true (default), Infer resets messages to their initial values if an observed value has changed.
Public propertySaveFactorGraphToFolder
If not null, the factor graph will be saved (in DGML format) to a file in the specified folder (created if necessary) under the model name and the extension ".dgml"
Public propertyShowFactorGraph
If true, displays the factor graph for the model, prior to compiling it.
Public propertyShowMsl
If true, prints the model definition in Model Specification Language (MSL), prior to compiling the model.
Public propertyShowProgress
If true, prints progress information to the console during inference.
Public propertyShowSchedule
If true, displays the schedule for the model, after the scheduler has run.
Public propertyShowTimings
If true, prints timing information to the console during inference.
Public propertyShowWarnings
If true, any warnings encountered during model compilation will be printed to the console.
Top
Events
  NameDescription
Public eventMessageUpdated
Event that is fired when a message that has been marked with ListenToMessages has been updated.
Public eventProgressChanged
Event that is fired when the progress of inference changes, typically at the end of one iteration of the inference algorithm.
Top
Remarks
The Debug class may be used to get debug messages for the inference engine. For example, use
Debug.Listeners.Add(new TextWriterTraceListener(Console.Out));
to get debug information for when compiled models and marginals are re-used.
See Also