Analytic marginalization over binary variables in physics data | Synapse