saealib.LinearKernel#

class saealib.LinearKernel[ソース]#

ベースクラス: RBFKernel

Linear radial basis function kernel.

This conditionally positive definite kernel has order 0 and requires a constant polynomial term for a well-posed system. Based on [16].

Methods

__init__

evaluate

Evaluate the linear kernel for a radial-distance matrix.

pairwise

Evaluate the kernel between every row of x1 and x2.

resolve

Return a kernel whose data-dependent parameters are resolved.

validate

Validate static kernel configuration.

Method Details

LinearKernel.__init__()#
戻り値の型:

None

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

Evaluate the linear kernel for a radial-distance matrix.

パラメータ:

r (ndarray)

戻り値の型:

ndarray

LinearKernel.pairwise(x1, x2)#

Evaluate the kernel between every row of x1 and x2.

パラメータ:
  • x1 (ndarray)

  • x2 (ndarray)

戻り値の型:

ndarray

LinearKernel.resolve(train_x)#

Return a kernel whose data-dependent parameters are resolved.

Calls validate() before returning, so a custom subclass that overrides validate() but not resolve() still gets its configuration checked at resolve time.

パラメータ:

train_x (ndarray)

戻り値の型:

Self

LinearKernel.validate()#

Validate static kernel configuration.

戻り値の型:

None