probsys / sppl

Probabilistic programming system for fast and exact symbolic inference
Apache License 2.0
76 stars 10 forks source link

Implement multi-variable environment in spn.Product #76

Open fsaad opened 4 years ago

fsaad commented 4 years ago

https://github.com/probcomp/sum-product-dsl/blob/c482341d04ef35febefc46f8821350e9236e8013/src/spn.py#L409-L413

  1. The multivariable transform must be of type event.
  2. If a condition or logprob query has multivariate symbol, then we cannot call logprob_factored on the children. Instead, we need to reassemble the query post-substitution and call self.logprob on the new query, which will take care of converting it to dnf, solving it, and factoring it again.
fsaad commented 4 years ago

Related https://github.com/probcomp/sppl/issues/92, since min/max can be of the form min(X1, X2, ..., Xn).