Using WAIC to compute Log Predictive Accuracy

Is it possible to use WAIC to calculate log predictive accuracy of pymc3 models?

For a linear regression model, I defined both X and Y as shared variables. Then once the model is trained using the train dataset, changed the value of the shared_X and shared_Y with test datasets.Then calculate the WAIC.

Is this similar to the log predictive accuracy? (or atleast WAIC approximation of it)

Sure, WAIC is one way to estimate the expected log point-wise predictive density, which in turn asymptotically equal to LOO.

Just keep in mind that predictive accuracy is in principle impossible to calculate, thus the usual quantification of predictive accuracy we have (psis-LOO, WAIC, DIC and AIC) are approximations that based on different certain assumptions. For example, one common assumption is that data are roughly IID: so computation on a subset of the data like cross-validation gives a reasonable picture of how the prediction would be in full data (or future unseen data). So exam the assumption of different quantification, and choose one that is mostly inline with your situation.

1 Like

Thanks @junpenglao

In addition, there’s a really nice discussion of DIC, AIC and WAIC in McElreath’s Statistical Rethinking book, in case you have it handy.

1 Like