Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions kulprit/projection/arviz_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,16 @@ def check_idata(idata, model, rng):
raise UserWarning("Incompatible model and inference data.")

# check if we have the log_likelihood group
if "log_likelihood" not in idata.groups:
if "log_likelihood" not in idata.children:
warnings.warn(
"log_likelihood group is missing from idata, it will be computed.\n"
"To avoid this message, please run Bambi's fit method with the option "
"idata_kwargs={'log_likelihood': True}"
"To avoid this message, please compute the log likelihood with\n"
"model.compute_log_likelihood(idata)"
)
model.compute_log_likelihood(idata)

# check if we have the posterior_predictive group
if "posterior_predictive" not in idata.groups:
if "posterior_predictive" not in idata.children:
model.predict(idata, kind="response", inplace=True, random_seed=rng)

return idata
Expand Down
Loading