# GaussianProcess

The Boulder Opal Toolkits are currently in beta phase of development. Breaking changes may be introduced.

class GaussianProcess(length_scale_bounds=None, seed=None)

The Gaussian process optimizer.

Parameters:
• length_scale_bounds (np.ndarray, optional) – The per-parameter length scale bounds on the test points. The bounds must be a NumPy array of shape (parameter count, 2) where the trailing axis are the bounds for each parameter (with the lower bound first, followed by the upper bound). If not specified, optimize will pick a value derived from the bounds by picking orders of magnitudes below/above the sidelength for each box axis.

• seed (int, optional) – Seed for the random number generator. Use this option to generate deterministic results from the optimizer.

Notes

The Gaussian process is defined by the kernel

$k({\mathbf x}_j, {\mathbf x}_k) = \exp \left(-\frac{1}{2} ( {\mathbf x}_j - {\mathbf x}_k )^\top \Sigma^{-2} ( {\mathbf x}_j - {\mathbf x}_k )\right) ,$

where $${\mathbf x}_j$$ is an $$n$$-dimensional vector representing the $$j$$-th test point, $$\Sigma= {\rm diag}(l_1, \cdots, l_n)$$ is an $$n \times n$$ diagonal matrix, and $$\{ l_j \}$$ are the length scales. The length scales are tuned while training the model, within the bounds set by the length_scale_bounds parameter. Roughly speaking, the amount a parameter needs to change to impact the optimization cost should lie within the length scale bounds.

It’s recommended to provide non-zero cost_uncertainty to optimize when using this optimizer, otherwise you might encounter a numerical error when the optimizer tries to fit the kernel with your input data. If the error persists, try increasing the cost_uncertainty value or decreasing the minimum length scale bound. However, such numerical error is also an indication that your data might not be suitable to be modelled by a Gaussian process, and in that case, consider using a different closed-loop optimizer.

For more detail on Gaussian processes see Gaussian process on Wikipedia.