PIEModel.predict_posterior#

PIEModel.predict_posterior(X, extend_idata=True, combined=True, **kwargs)[source]#

Posterior predictive draws for X as a single DataArray.

Overrides RegressionModelBuilder.predict_posterior() to skip the inherited sklearn.utils.check_array() validation, which would coerce the feature DataFrame to a numeric ndarray (dropping column names and rejecting the categorical columns PIEModel label-encodes itself).

Parameters:
Xpd.DataFrame

Campaign feature matrix for prediction. Same schema as training X.

extend_idatabool

Whether to attach predictions to self.idata. Defaults to True.

combinedbool

Whether to combine chain and draw dims into a single sample dim. Defaults to True.

Returns:
xarray.DataArray

Posterior predictive draws for self.output_var in the original target scale.