mbi.marginal_oracles.logspace_sum_product_stable_v1

mbi.marginal_oracles.logspace_sum_product_stable_v1(log_factors: list[~mbi.factor.Factor], dom: ~mbi.domain.Domain, einsum_fn=<function einsum>) Factor[source]

More stable implementation of logspace_sum_product.

This ipmlementation may (or may not) materialize a Factor over the domain of all elements of log_factors. Without JIT, it will materialize this “super-factor”. Under JIT, there may be some instances where the compiler can figure out that it does not need to materialize this intermediate to compute the final output.