inferlo.pairwise.optimization.tree_dp.max_likelihood_tree_dp

inferlo.pairwise.optimization.tree_dp.max_likelihood_tree_dp(model: PairWiseFiniteModel)[source]

Max Likelihood for the pairwise model.

Performs dynamic programming on tree.

Applicable only if the interaction graph is a tree or a forest. Otherwise throws exception.

Parameters:

model – Model for which to find most likely state.

Returns:

Most likely state. np.array of ints.