reading the documentation of the sample_posterior_predictive
method I found this
pymc.sample_posterior_predictive(trace, …)[source]
Generate posterior predictive samples from a model given a trace.
parameters:
tracebackend
,list
,xarray.Dataset
,arviz.InferenceData
, orMultiTrace
Trace generated from MCMC sampling, or a list of dicts (eg. points or from find_MAP()), or xarray.Dataset (eg. InferenceData.posterior or InferenceData.prior)
so yes, basically you just need to use the MAP values when doing the prediction, changing the trace parameter from the posterior sample:
trace = pm.sample(draws=draws, ...)
post_idata = pm.sample_posterior_predictive(trace, ...)
to a wrapped map list [map]
map = pm.find_MAP()
post_idata = pm.sample_posterior_predictive([map], ...)
that was all