|
68 | 68 | "draw",
|
69 | 69 | "sample_prior_predictive",
|
70 | 70 | "sample_posterior_predictive",
|
71 |
| - "sample_posterior_predictive_w", |
72 | 71 | )
|
73 | 72 |
|
74 | 73 |
|
@@ -671,57 +670,3 @@ def sample_posterior_predictive(
|
671 | 670 | idata.extend(idata_pp)
|
672 | 671 | return idata
|
673 | 672 | return idata_pp
|
674 |
| - |
675 |
| - |
676 |
| -def sample_posterior_predictive_w( |
677 |
| - traces, |
678 |
| - samples: Optional[int] = None, |
679 |
| - models: Optional[list[Model]] = None, |
680 |
| - weights: Optional[ArrayLike] = None, |
681 |
| - random_seed: RandomState = None, |
682 |
| - progressbar: bool = True, |
683 |
| - return_inferencedata: bool = True, |
684 |
| - idata_kwargs: Optional[dict] = None, |
685 |
| -): |
686 |
| - """Generate weighted posterior predictive samples from a list of models and |
687 |
| - a list of traces according to a set of weights. |
688 |
| -
|
689 |
| - Parameters |
690 |
| - ---------- |
691 |
| - traces : list or list of lists |
692 |
| - List of traces generated from MCMC sampling (xarray.Dataset, arviz.InferenceData, or |
693 |
| - MultiTrace), or a list of list containing dicts from find_MAP() or points. The number of |
694 |
| - traces should be equal to the number of weights. |
695 |
| - samples : int, optional |
696 |
| - Number of posterior predictive samples to generate. Defaults to the |
697 |
| - length of the shorter trace in traces. |
698 |
| - models : list of Model |
699 |
| - List of models used to generate the list of traces. The number of models should be equal to |
700 |
| - the number of weights and the number of observed RVs should be the same for all models. |
701 |
| - By default a single model will be inferred from ``with`` context, in this case results will |
702 |
| - only be meaningful if all models share the same distributions for the observed RVs. |
703 |
| - weights : array-like, optional |
704 |
| - Individual weights for each trace. Default, same weight for each model. |
705 |
| - random_seed : int, RandomState or Generator, optional |
706 |
| - Seed for the random number generator. |
707 |
| - progressbar : bool, optional default True |
708 |
| - Whether or not to display a progress bar in the command line. The bar shows the percentage |
709 |
| - of completion, the sampling speed in samples per second (SPS), and the estimated remaining |
710 |
| - time until completion ("expected time of arrival"; ETA). |
711 |
| - return_inferencedata : bool |
712 |
| - Whether to return an :class:`arviz:arviz.InferenceData` (True) object or a dictionary (False). |
713 |
| - Defaults to True. |
714 |
| - idata_kwargs : dict, optional |
715 |
| - Keyword arguments for :func:`pymc.to_inference_data` |
716 |
| -
|
717 |
| - Returns |
718 |
| - ------- |
719 |
| - arviz.InferenceData or Dict |
720 |
| - An ArviZ ``InferenceData`` object containing the posterior predictive samples from the |
721 |
| - weighted models (default), or a dictionary with variable names as keys, and samples as |
722 |
| - numpy arrays. |
723 |
| - """ |
724 |
| - raise FutureWarning( |
725 |
| - "The function `sample_posterior_predictive_w` has been removed in PyMC 4.3.0. " |
726 |
| - "Switch to `arviz.stats.weight_predictions`" |
727 |
| - ) |
0 commit comments