class_docstr: Base class for Gaussian processes. 
class_docstr_tok: ["Base","class","for","Gaussian","processes","."]
docstr: Computes the gradient of log marginal likelihood. 
docstr_tok: ["Computes","the","gradient","of","log","marginal","likelihood","."]
code: def compute_grad_log_marginal_likelihood(self, param, *args):
      """Computes the gradient of log marginal likelihood."""
      alpha = np.expand_dims(self.alpha, axis=0)
      if param == "noise_var":
          grad_m = self.noise_var * np.identity(len(self.X))
      elif param == "noise_mean":
          return np.matmul(alpha, np.ones((len(self.Y), 1))).item()
      else:
          grad_m = self.kernel.gradient(param, self.X, self.X, *args)
      grad_m = np.matmul(
          alpha.T, np.matmul(alpha, grad_m)
      ) - solve_upper_triangular(
          self.L.T, solve_lower_triangular(self.L, grad_m)
      )
      return 0.5 * np.trace(grad_m)
  
imports: from __future__ import division
  from argparse import Namespace
  from itertools import product
  import sys
  import numpy
  from ..distributions.model import Model
  from ..distributions import continuous
  from ..distributions import discrete
  from ..utils.general_utils import stable_cholesky, draw_gaussian_samples, project_symmetric_to_psd_cone, solve_lower_triangular, solve_upper_triangular
  from ..utils.oper_utils import direct_ft_maximise, pdoo_maximise, random_maximise, random_sample_cts_dscr
  from ..utils.option_handler import get_option_specs, load_options
  from ..utils.reporters import get_reporter
label_desc: Use image node_id 12 for calling the GP obj's underlying member method code with example usage: obj.compute_grad_log_marginal_likelihood(param) and returns: unknown, np