Safe Haskell | Safe-Infered |
---|

Algorithms for variable elimination

- priorMarginal :: (Graph g, Factor f, Show f) => BayesianNetwork g f -> EliminationOrder -> EliminationOrder -> f
- posteriorMarginal :: (Graph g, Factor f, Show f) => BayesianNetwork g f -> EliminationOrder -> EliminationOrder -> [DVI Int] -> f
- interactionGraph :: (FoldableWithVertex g, Factor f, UndirectedGraph g') => BayesianNetwork g f -> g' () DV
- degreeOrder :: (FoldableWithVertex g, Factor f, Graph g) => BayesianNetwork g f -> EliminationOrder -> Int
- minDegreeOrder :: (Graph g, Factor f, FoldableWithVertex g) => BayesianNetwork g f -> EliminationOrder
- minFillOrder :: (Graph g, Factor f, FoldableWithVertex g) => BayesianNetwork g f -> EliminationOrder
- allVariables :: (Graph g, Factor f) => BayesianNetwork g f -> [DV]
- marginal :: Factor f => [f] -> EliminationOrder -> EliminationOrder -> [DVI Int] -> f
- type EliminationOrder = [DV]

# Inferences

:: (Graph g, Factor f, Show f) | |

=> BayesianNetwork g f | Bayesian Network |

-> EliminationOrder | Ordering of variables to marginalize |

-> EliminationOrder | Ordering of remaining to keep in result |

-> f |

Compute the prior marginal. All the variables in the elimination order are conditionning variables ( p( . | conditionning variables) )

:: (Graph g, Factor f, Show f) | |

=> BayesianNetwork g f | Bayesian Network |

-> EliminationOrder | Ordering of variables to marginzalie |

-> EliminationOrder | Ordering of remaining variables |

-> [DVI Int] | Assignment for some factors in vaiables to marginalize |

-> f |

# Interaction graph and elimination order

interactionGraph :: (FoldableWithVertex g, Factor f, UndirectedGraph g') => BayesianNetwork g f -> g' () DVSource

Compute the interaction graph of the BayesianNetwork

degreeOrder :: (FoldableWithVertex g, Factor f, Graph g) => BayesianNetwork g f -> EliminationOrder -> IntSource

Compute the degree order of an elimination order

minDegreeOrder :: (Graph g, Factor f, FoldableWithVertex g) => BayesianNetwork g f -> EliminationOrderSource

Elimination order minimizing the degree

minFillOrder :: (Graph g, Factor f, FoldableWithVertex g) => BayesianNetwork g f -> EliminationOrderSource

Elimination order minimizing the filling

allVariables :: (Graph g, Factor f) => BayesianNetwork g f -> [DV]Source

Get all variables from a Bayesian Network

:: Factor f | |

=> [f] | Bayesian Network |

-> EliminationOrder | Ordering of variables to marginzalie |

-> EliminationOrder | Ordering of remaining variables |

-> [DVI Int] | Assignment for some factors in vaiables to marginalize |

-> f |

Compute the prior marginal. All the variables in the elimination order are conditionning variables ( p( . | conditionning variables) )

type EliminationOrder = [DV]Source

Elimination order