MMMModelBuilder.predict_posterior#

MMMModelBuilder.predict_posterior(X=None, extend_idata=True, combined=True, **kwargs)#

Generate posterior predictive samples on unseen data.

Parameters:
Xarray_like | array, shape (n_pred, n_features)

The input data used for prediction. If scikit-learn is available, array-like, otherwise array.

extend_idataBoolean

Determine whether the predictions should be added to inference data object. Defaults to True.

combined: Boolean

Combine chain and draw dims into sample. Won’t work if a dim named sample already exists. Defaults to True.

**kwargs: Additional arguments to pass to sample_posterior_predictive method
Returns:
y_predDataArray

Posterior predictive samples for each input X. Shape is (n_pred, chains * draws) if combined is True, otherwise (chains, draws, n_pred).