where 𝜎 O(𝑥) are the diagonals of the covariance matrix calculated using 𝑘 Q ( (𝑥, 𝑥′). To train the GP, the log likelihood is maximized, which is the probability that the model predicts the training outputs given the inputs and hyperparameters. The log likelihood avoids overfitting by trading off accuracy of fit to the training data and complexity of the model. The optimal hyperparameters 𝜽 * are found by maximizing the log likelihood of the outputs 𝑦 given the inputs 𝑿 and the hyperparameters 𝜃 (where