pplbench/models/logistic_regression.py [99:112]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @staticmethod
    def evaluate_posterior_predictive(
        samples: xr.Dataset, test: xr.Dataset
    ) -> np.ndarray:
        """
        Computes the predictive likelihood of all the test items w.r.t. each sample.
        See the class documentation for the `samples` and `test` parameters.
        :returns: a numpy array of the same size as the sample dimension.
        """
        # transpose the datasets to be in a convenient format
        samples = samples.transpose("draw", "feature")
        test = test.transpose("feature", "item")
        alpha = samples.alpha.values.reshape(-1, 1)  # size = (iterations, 1)
        beta = samples.beta.values  # size = (iterations, k)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



pplbench/models/robust_regression.py [104:117]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @staticmethod
    def evaluate_posterior_predictive(
        samples: xr.Dataset, test: xr.Dataset
    ) -> np.ndarray:
        """
        Computes the predictive likelihood of all the test items w.r.t. each sample.
        See the class documentation for the `samples` and `test` parameters.
        :returns: a numpy array of the same size as the sample dimension.
        """
        # transpose the datasets to be in a convenient format
        samples = samples.transpose("draw", "feature")
        test = test.transpose("feature", "item")
        alpha = samples.alpha.values.reshape(-1, 1)  # size = (iterations, 1)
        beta = samples.beta.values  # size = (iterations, k)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



