class_docstr: Base class for Gaussian processes. 
class_docstr_tok: ["Base","class","for","Gaussian","processes","."]
docstr: Constructor. 
docstr_tok: ["Constructor","."]
code: def __init__(
      self,
      X,
      Y,
      kernel,
      mean_func,
      noise_var,
      build_posterior=True,
      reporter=None,
      handle_non_psd_kernels="guaranteed_psd",
  ):
      """Constructor."""
      super(GP, self).__init__()
      _check_feature_label_lengths_and_format(X, Y)
      self.set_data(X, Y, build_posterior=False)
      self.kernel = kernel
      self.mean_func = mean_func
      self.noise_var = noise_var
      self.reporter = get_reporter(reporter)
      self.handle_non_psd_kernels = handle_non_psd_kernels
      # Some derived attribues.
      self.num_tr_data = len(self.Y)
      # Initialise other attributes we will need.
      self.L = None
      self.alpha = None
      self.K_trtr_wo_noise = None
      self._set_up()
      # Build posterior if necessary
      if build_posterior:
          self.build_posterior()
  
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 1 to create a new GP object from inherited base classes: object with example: obj = GP(X, Y, kernel, mean_func, noise_var, build_posterior, reporter, handle_non_psd_kernels)