saealib.GaussianKernel#

class saealib.GaussianKernel(*, length_scale=None)[ソース]#

ベースクラス: RBFKernel

Gaussian radial basis function kernel.

Uses the exp(-0.5 * (r / length_scale)^2) parameterization; equivalent to the papers' exp(-gamma * r^2) form with gamma = 1 / (2 * length_scale^2). Based on [16, 17].

パラメータ:

length_scale (float or None) -- Kernel width parameter, in the same distance units as the input data. None resolves to the median pairwise training-point distance at fit time.

Methods

__init__

evaluate

Evaluate the Gaussian kernel exp(-0.5 * (r / length_scale)**2).

pairwise

Evaluate the kernel between every row of x1 and x2.

resolve

Resolve length_scale from training data if unset.

validate

Validate length_scale.

Method Details

GaussianKernel.__init__(*, length_scale=None)#
パラメータ:

length_scale (float | None)

戻り値の型:

None

GaussianKernel.evaluate(r)[ソース]#

Evaluate the Gaussian kernel exp(-0.5 * (r / length_scale)**2).

パラメータ:

r (ndarray)

戻り値の型:

ndarray

GaussianKernel.pairwise(x1, x2)#

Evaluate the kernel between every row of x1 and x2.

パラメータ:
  • x1 (ndarray)

  • x2 (ndarray)

戻り値の型:

ndarray

GaussianKernel.resolve(train_x)[ソース]#

Resolve length_scale from training data if unset.

パラメータ:

train_x (ndarray)

戻り値の型:

Self

GaussianKernel.validate()[ソース]#

Validate length_scale.

戻り値の型:

None