GaussianProcess

class boulderopal.closed_loop.GaussianProcess(bounds, length_scale_bounds=None, seed=None)

The Gaussian process optimizer.

Parameters

  • bounds (Bounds) – The bounds on the test points.
  • length_scale_bounds (np.ndarray or None , 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 or None , optional) – Seed for the random number generator used in the optimizer. If set, must be a non-negative integer. Use this option to generate deterministic results from the optimizer.

Notes

The Gaussian process is defined by the kernel

k(xj,xk)=exp(12(xjxk)Σ2(xjxk)), 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 xj{\mathbf x}_j is an nn-dimensional vector representing the jj-th test point, Σ=diag(l1,,ln)\Sigma= {\rm diag}(l_1, \cdots, l_n) is an n×nn \times n diagonal matrix, and {lj}\{ 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.

Was this useful?