google / bayesnf

Bayesian Neural Field models for prediction in large-scale spatiotemporal datasets
https://google.github.io/bayesnf/
Apache License 2.0
93 stars 10 forks source link

Fix sample_size for VI to be the number of posterior samples not number of Monte Carlo samples for divergence #20

Closed fsaad closed 9 months ago

fsaad commented 9 months ago

The sample_size argument in fit for BayesianNeuralFieldVI https://github.com/google/bayesnf/blob/2debb69cf21daf7de982843a82436a57d5a97dd3/src/bayesnf/spatiotemporal.py#L379

is supposed to denote the number of posterior samples from each surrogate in the ensemble. However, tracking down further in inference.fit_vi, we see

https://github.com/google/bayesnf/blob/2debb69cf21daf7de982843a82436a57d5a97dd3/src/bayesnf/inference.py#L653-L655