docstr: Compute the expected log density of the data, given a Gaussian
  distribution for the function values.
  
  if
      q(x,f) = N(Fmu, Fvar)  - Fmu: [N, D]  Fvar: [N, D]
  
  and this object represents
  
      p(y|x,f)  - Y: [N, 1]
  
  then this method computes
  
     ∫ (log p(y|x,f)) q(x,f) df.
  
  
  Here, we implement a default Monte Carlo quadrature routine.
docstr_tok: ["Compute","the","expected","log","density","of","the","data",",","given","a","Gaussian","distribution","for","the","function","values",".","if","q","(","x",",","f",")","=","N","(","Fmu",",","Fvar",")","-","Fmu",":","[","N",",","D","]","Fvar",":","[","N",",","D","]","and","this","object","represents","p","(","y|x",",","f",")","-","Y",":","[","N",",","1","]","then","this","method","computes","\u222b","(","log","p","(","y|x",",","f",")",")","q","(","x",",","f",")","df",".","Here",",","we","implement","a","default","Monte","Carlo","quadrature","routine","."]
code: def _variational_expectations(
      self,
      X: TensorType,
      Fmu: TensorType,
      Fvar: TensorType,
      Y: TensorType,
      epsilon: Optional[TensorType] = None,
  ) -> tf.Tensor:
      r"""
      Compute the expected log density of the data, given a Gaussian
      distribution for the function values.
  
      if
          q(x,f) = N(Fmu, Fvar)  - Fmu: [N, D]  Fvar: [N, D]
  
      and this object represents
  
          p(y|x,f)  - Y: [N, 1]
  
      then this method computes
  
         ∫ (log p(y|x,f)) q(x,f) df.
  
  
      Here, we implement a default Monte Carlo quadrature routine.
      """
  
      def log_prob(
          F: TensorType, X_: TensorType, Y_: TensorType
      ) -> tf.Tensor:
          return self.log_prob(X_, F, Y_)
  
      return tf.reduce_sum(
          self._mc_quadrature(
              log_prob, Fmu, Fvar, epsilon=epsilon, X_=X, Y_=Y
          ),
          axis=-1,
      )
  
imports: import abc
  from typing import Any, Callable, Iterable, Optional, Sequence, Union
  import tensorflow
  from check_shapes import check_shapes, inherit_check_shapes
  from ..base import MeanAndVariance, Module, TensorType
  from ..quadrature import GaussianQuadrature, NDiagGHQuadrature, ndiag_mc
label_desc: Use image node_id 5 for calling the MonteCarloLikelihood obj's underlying member method code with example usage: obj._variational_expectations(X, Fmu, Fvar, Y, epsilon) and returns: tf, self