class_docstr: General class for handling a Gaussian Process in GPyOpt.
  
  :param kernel: GPy kernel to use in the GP model.
  :param noise_var: value of the noise variance if known.
  :param exact_feval: whether noiseless evaluations are available. IMPORTANT to make the optimization work well in noiseless scenarios (default, False).
  :param optimizer: optimizer of the model. Check GPy for details.
  :param max_iters: maximum number of iterations used to optimize the parameters of the model.
  :param optimize_restarts: number of restarts in the optimization.
  :param sparse: whether to use a sparse GP (default, False). This is useful when many observations are available.
  :param num_inducing: number of inducing points if a sparse GP is used.
  :param verbose: print out the model messages (default, False).
  :param ARD: whether ARD is used in the kernel (default, False).
  :param mean_function: GPy Mapping to use as the mean function for the GP model (default, None).
  
  .. Note:: This model does Maximum likelihood estimation of the hyper-parameters.
docstr: Creates the model given some input data X and Y.
docstr_tok: ["Creates","the","model","given","some","input","data","X","and","Y","."]
code: def _create_model(self, X, Y):
      """
      Creates the model given some input data X and Y.
      """
  
      # --- define kernel
      self.input_dim = X.shape[1]
      if self.kernel is None:
          kern = GPy.kern.Matern52(
              self.input_dim, variance=1.0, ARD=self.ARD
          )  # + GPy.kern.Bias(self.input_dim)
      else:
          kern = self.kernel
          self.kernel = None
  
      # --- define model
      noise_var = (
          Y.var() * 0.01 if self.noise_var is None else self.noise_var
      )
  
      if not self.sparse:
          self.model = GPy.models.GPRegression(
              X,
              Y,
              kernel=kern,
              noise_var=noise_var,
              mean_function=self.mean_function,
          )
      else:
          self.model = GPy.models.SparseGPRegression(
              X,
              Y,
              kernel=kern,
              num_inducing=self.num_inducing,
              mean_function=self.mean_function,
          )
  
      # --- restrict variance if exact evaluations of the objective
      if self.exact_feval:
          self.model.Gaussian_noise.constrain_fixed(1e-6, warning=False)
      else:
          # --- We make sure we do not get ridiculously small residual noise variance
          self.model.Gaussian_noise.constrain_bounded(
              1e-9, 1e6, warning=False
          )
  
imports: import numpy
  import GPy
  from .base import BOModel
label_desc: Use image node_id 3 for calling the GPModel obj's underlying member method code with example usage: obj._create_model(X, Y) without return types