Bambi predict complains that the label is not in dataset

Hi,
I’m following the examples from

and a few others.
This works (mostly) fine, but when I try to predict on my own data, I get that ValueError: Dataset does not contain the dimensions: {‘y_mean_obs’}.

I checked that someone else has the same issue on github.
What am I (are we) doing wrong? Other than the github issue, I have the exact same code as the first example notebook above but with different data.

When I call the predict with the posterior predictive (kind = ‘pps’) it works. Can someone tell me why ?
Thanks a lot!

1 Like

@tcapretto

2 Likes

@cluhmann thanks for tagging me here!

@Oliver which Bambi version are you using? I’ve just run both notebooks you attached with the development version of Bambi and both worked fine.

If the problem appears with a different dataset/model, could you share a minimum reproducible example so I can check the issue on my side?

EDIT

%load_ext watermark
%watermark -n -u -v -iv -w
Last updated: Wed Apr 13 2022

Python implementation: CPython
Python version       : 3.8.5
IPython version      : 7.29.0

arviz : 0.11.4
bambi : 0.7.1
sys   : 3.8.5 (default, Sep  4 2020, 07:30:14) 
[GCC 7.3.0]
pandas: 1.3.1
numpy : 1.20.0

Watermark: 2.1.0
2 Likes

I think I found the solution. See this comment ValueError: Dataset does not contain the dimensions: {'y_mean_obs'} · Issue #485 · bambinos/bambi · GitHub

2 Likes

thanks a lot, I got it to work too.
I actually commented there too, funky!
Thanks a million! I apologize for the late reply, I didn’t get a notification email this time.

1 Like