Predict new data

Hi all,

I am trying to predict unseen data with a simple logistic regression model, so similar to a simple machine learning classification.

I have build and trained a model with numpyro on a dataset and now I want to predict the unseen data. The model is working and I can make inferences based on the posterior etc. But I cannot figure out how to predict the new data.

I assume I missed something simple in the documentation/examples but any hints or pointers would be great appreciated.

Thanks in advanced.

look for usage of Predictive in the repo, e.g. here

Great and thanks for quick reply.

I can get it work for a single precition but if I get it several in one go I get a typeerror.

TypeError: mul got incompatible shapes for broadcasting: (3000,), (14,).

Here I used 14 and had 3000 posterior samples.

if you can get it to work for a single prediction you can use vmap to do it for more predictions.

otherwise you probably need to fix your model, which apparently has some broadcasting issues and can’t handle multiple inputs correctly. looking at examples in the repo or reading this might help

Great, again thank you for swift and useful reply.