bayeso.tp.tp_likelihood¶
It defines the functions related to likelihood for Student-\(t\) process regression.
-
bayeso.tp.tp_likelihood.
neg_log_ml
(X_train: numpy.ndarray, Y_train: numpy.ndarray, hyps: numpy.ndarray, str_cov: str, prior_mu_train: numpy.ndarray, use_ard: bool = True, fix_noise: bool = True, use_gradient: bool = True, debug: bool = False) → Union[float, Tuple[float, numpy.ndarray]]¶ This function computes a negative log marginal likelihood.
Parameters: - X_train (numpy.ndarray) – inputs. Shape: (n, d) or (n, m, d).
- Y_train (numpy.ndarray) – outputs. Shape: (n, 1).
- hyps (numpy.ndarray) – hyperparameters for Gaussian process. Shape: (h, ).
- str_cov (str.) – the name of covariance function.
- prior_mu_train (numpy.ndarray) – the prior values computed by get_prior_mu(). Shape: (n, 1).
- use_ard (bool., optional) – flag for automatic relevance determination.
- fix_noise (bool., optional) – flag for fixing a noise.
- use_gradient (bool., optional) – flag for computing and returning gradients of negative log marginal likelihood.
- debug (bool., optional) – flag for printing log messages.
Returns: negative log marginal likelihood, or (negative log marginal likelihood, gradients of the likelihood).
Return type: float, or tuple of (float, np.ndarray)
Raises: AssertionError