inferlo.pairwise.inference.path_dp.infer_path_dp
- inferlo.pairwise.inference.path_dp.infer_path_dp(model: PairWiseFiniteModel) InferenceResult [source]
Inference using DP on path decomposition.
Performs dynamic programming on the path decomposition of the underlying graph of the pairwise model.
Time complexity is O(gr_size * al_size^(2*PW)), where PW is pathwidth of the graph.
- Parameters:
model – Potts model for which to perform inference.
- Returns:
InferenceResult
object.