mojolearn.RBF#
- class mojolearn.RBF(length_scale=1.0, length_scale_bounds=(1e-05, 100000.0))[source]#
Bases:
KernelRadial basis function (squared exponential) kernel.
Follows scikit-learn’s
RBF:k(x, y) = exp(-0.5 * ||(x - y) / length_scale||^2).- Parameters:
length_scale (float or sequence of float, default 1.0) – A scalar gives an isotropic kernel; a sequence of
n_featuresvalues gives one length scale per feature (anisotropic). Any other length is refused when the model is fitted. Values must be positive and finite; they are checked at fit time.length_scale_bounds (pair of float, sequence of pairs, or “fixed”, default (1e-5, 1e5)) – Bounds for the optimizer: one pair for every length scale, one pair per length scale, or
"fixed". Both bounds must be finite and positive withlow <= high; otherwiseValueErroris raised.
Examples
>>> import mojolearn >>> kernel = mojolearn.RBF(length_scale=[1.0, 2.0, 0.5])
Attributes
boundsNatural log of each free hyperparameter's
(low, high)bounds, as a list of[low, high]pairs.n_dimsNumber of free hyperparameters (the length of
theta).thetaNatural log of the free hyperparameters, as a list of floats.