lppl  v2.0.0

◆ map_structure()

template<typename O , typename... Ts>
auto map_structure ( )

Queries for the maximum a posteriori structure.

The result of calling emit on the resulting queryer is the \(\arg \max_{gr\_output} p(gr\_output | data)\), where the posterior over gr_output is constructed by the user-selected inference algorithm. More mathematically, suppose the graph probabilistic program factors as \( p(x, z, g) = p(x|z, g) p(z, g)\), where \(x\) is observed random variables, \(x\) are unobserved random variables, and \(g\) are random variables determining the structure of the graph associated with each sample. The resulting queryer returns \(\arg \max_{g, z} p(g, z|x)\).

Template Parameters
OThe output type of the graph probabilistic program
TsThe types of distributions contained within the probabilistic program
Returns
auto An Optimizer instance