ReactiveBayes / RxInfer.jl

Julia package for automated Bayesian inference on a factor graph with reactive message passing
MIT License
237 stars 24 forks source link

Predictions in the Bike Rental Demand demo are worse than in RxInfer v2 due to factorization constraints #291

Open bvdmitri opened 2 months ago

bvdmitri commented 2 months ago

We knew about this with @albertpod. I'm noting it here so we don't forget. The problem is that in RxInfer v3.0.0, there was a change in how predictions are constrained by default. Before, the where { allow_missing = true } block made sure that data points were connected with other hidden states (jointly distributed). Now, with the factorized = true option in the getorcreate! function of GraphPPL.jl, all data points are separated (mean-field ed).

One possible solution could be to introduce a special structure, let's call it UnfactorizedData, that wraps the data input, allowing us to set factorized = false in the getorcreate! function. For example:

infer(
    model = ...,
    data = (y = UnfactorizedData(missing), ) 
)