Package ch.idsia.crema.inference.fe
Class FactorEliminationModel
- java.lang.Object
-
- ch.idsia.crema.inference.fe.FactorEliminationModel
-
- All Implemented Interfaces:
Inference<DAGModel<BayesianFactor>,BayesianFactor>
public class FactorEliminationModel extends Object implements Inference<DAGModel<BayesianFactor>,BayesianFactor>
Author: Claudio "Dna" Bonesana Project: CreMA Date: 06.02.2018 09:37
-
-
Constructor Summary
Constructors Constructor Description FactorEliminationModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BayesianFactor
query(DAGModel<BayesianFactor> model, int query)
Algorithm 9 from "Modeling and Reasoning with BN", Dawiche, p.153BayesianFactor
query(DAGModel<BayesianFactor> model, gnu.trove.map.TIntIntMap evidence, int query)
Perform an inference.
-
-
-
Method Detail
-
query
public BayesianFactor query(DAGModel<BayesianFactor> model, int query)
Algorithm 9 from "Modeling and Reasoning with BN", Dawiche, p.153- Specified by:
query
in interfaceInference<DAGModel<BayesianFactor>,BayesianFactor>
- Parameters:
model
- model to work withquery
- variable to query- Returns:
- the prior marginal on the query variable
-
query
public BayesianFactor query(DAGModel<BayesianFactor> model, gnu.trove.map.TIntIntMap evidence, int query)
Description copied from interface:Inference
Perform an inference.- Specified by:
query
in interfaceInference<DAGModel<BayesianFactor>,BayesianFactor>
- Parameters:
model
- the model to use for inferenceevidence
- the observed variable as a map of variable-statesquery
- the variable that will be queried- Returns:
- the result of the inference
-
-