Package com.bayesserver.inference
Class LoopyBeliefInferenceFactory
- java.lang.Object
-
- com.bayesserver.inference.LoopyBeliefInferenceFactory
-
- All Implemented Interfaces:
InferenceFactory
public final class LoopyBeliefInferenceFactory extends Object implements InferenceFactory
Uses the factory design pattern to create inference related objects for the Loopy Belief algorithm. SeeInferenceFactoryfor more details.
-
-
Constructor Summary
Constructors Constructor Description LoopyBeliefInferenceFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InferencecreateInferenceEngine(Network network)Creates an instance of an inference algorithm, with the [network] as it's target.QueryOptionscreateQueryOptions()Creates options that govern how eachqueryis performed.QueryOutputcreateQueryOutput()Creates an object that collects information about eachquery, in addition to thedistributions.
-
-
-
Method Detail
-
createInferenceEngine
public Inference createInferenceEngine(Network network)
Creates an instance of an inference algorithm, with the [network] as it's target.- Specified by:
createInferenceEnginein interfaceInferenceFactory- Parameters:
network- The target Bayesian network.- Returns:
- The inference algorithm/engine.
-
createQueryOptions
public QueryOptions createQueryOptions()
Creates options that govern how eachqueryis performed. Each algorithm may provide additional options.- Specified by:
createQueryOptionsin interfaceInferenceFactory- Returns:
- The options.
-
createQueryOutput
public QueryOutput createQueryOutput()
Creates an object that collects information about eachquery, in addition to thedistributions. Each algorithm may provide additional output information.The output object can be created once, and reused over many calls to
Inference.query(com.bayesserver.inference.QueryOptions, com.bayesserver.inference.QueryOutput).- Specified by:
createQueryOutputin interfaceInferenceFactory- Returns:
- The output instance.
-
-