bayeso.gp.gp_tensorflow

bayeso.gp.gp_tensorflow.get_optimized_kernel(X_train, Y_train, prior_mu, str_cov, is_fixed_noise=True, num_iters=1000, debug=False)

This function computes the kernel matrix optimized by optimization method specified, its inverse matrix, and the optimized hyperparameters, using TensorFlow and TensorFlow probability.

Parameters:
  • X_train (numpy.ndarray) – inputs. Shape: (n, d) or (n, m, d).
  • Y_train (numpy.ndarray) – outputs. Shape: (n, 1).
  • prior_mu (function or NoneType) – prior mean function or None.
  • str_cov (str.) – the name of covariance function.
  • is_fixed_noise (bool., optional) – flag for fixing a noise.
  • num_iters (int., optional) – the number of iterations for optimizing negative log likelihood.
  • debug (bool., optional) – flag for printing log messages.
Returns:

a tuple of kernel matrix over X_train, kernel matrix inverse, and dictionary of hyperparameters.

Return type:

tuple of (numpy.ndarray, numpy.ndarray, dict.)

Raises:

AssertionError, ValueError