jpt.inference
Submodules
Classes
Solver for k-MPE inference about n independent variables |
Package Contents
- class jpt.inference.MPESolver(distributions: jpt.variables.VariableMap, likelihood_divisor: float = None)
Solver for k-MPE inference about n independent variables
This algorithm iteratively constructs all
kmost probable explanations in descending order by performing a branch-and-bound search in the space of atomic areas of the respective distributions. In constrast to classic BnB search, we do not throw away the pruned states but save them in a priority queue, where we can continue the search for the subsequent 2nd, 3rd, …, k-th best solution.- distributions: jpt.variables.VariableMap
- domains
- constraints
- lb
- likelihood(solution: BnBSolution)
- variable_order(state: MPEState = None) Iterator[jpt.variables.Variable]
- Parameters:
state – The state to start from
- Returns:
An iterator over free variables for a state sorted by number of different possible states (lowest amount of values first).
- solve(k: int = 0) Iterator[List[jpt.variables.ValueAssignment]]
Generate
kMPE states with decreasing probability.- Returns: