mojolearn.WhiteKernel#

class mojolearn.WhiteKernel(noise_level=1.0, noise_level_bounds=(1e-05, 100000.0))#

White noise kernel: adds noise_level to the training diagonal.

Follows scikit-learn’s WhiteKernel: the noise appears only on the diagonal of the training covariance, and contributes zero to the covariance between training and query points. Add it to another kernel to model observation noise.

Parameters:
  • noise_level (float, default 1.0) – The noise variance.

  • noise_level_bounds (pair of float or “fixed”, default (1e-5, 1e5)) – Bounds for the optimizer, or "fixed" to keep the value fixed. Both bounds must be finite and positive with low <= high; otherwise ValueError is raised.

Examples

>>> import mojolearn
>>> kernel = mojolearn.RBF(1.0) + mojolearn.WhiteKernel(0.1)

Attributes

bounds

Natural log of each free hyperparameter's (low, high) bounds, as a list of [low, high] pairs.

n_dims

Number of free hyperparameters (the length of theta).

theta

Natural log of the free hyperparameters, as a list of floats.

property bounds#

Natural log of each free hyperparameter’s (low, high) bounds, as a list of [low, high] pairs.

property n_dims#

Number of free hyperparameters (the length of theta).

property theta#

Natural log of the free hyperparameters, as a list of floats.

On a fitted kernel_ this is the optimizer’s own theta.