#NEWLINE# def log_predictive_density_sampling( self , x_test , y_test , Y_metadata = None , num_samples = 1000 ) : #NEWLINE# #INDENT# '\n        Calculation of the log predictive density by sampling\n\n        .. math:\n            p(y_{*}|D) = p(y_{*}|f_{*})p(f_{*}|\\mu_{*}\\sigma^{2}_{*})\n\n        :param x_test: test locations (x_{*})\n        :type x_test: (Nx1) array\n        :param y_test: test observations (y_{*})\n        :type y_test: (Nx1) array\n        :param Y_metadata: metadata associated with the test points\n        :param num_samples: number of samples to use in monte carlo integration\n        :type num_samples: int\n        ' #NEWLINE# ( mu_star , var_star ) = self . _raw_predict ( x_test ) #NEWLINE# return self . likelihood . log_predictive_density_sampling ( y_test , mu_star , var_star , Y_metadata = Y_metadata , num_samples = num_samples )