Class: Kernel

Base class for all kernels.

Python Reference

Constructors

new Kernel()

new Kernel(opts?): Kernel

Parameters

ParameterTypeDescription
opts?object-
opts.bounds?ArrayLike[]The log-transformed bounds on the kernel’s hyperparameters theta

Returns Kernel

Defined in generated/gaussian_process/kernels/Kernel.ts:21

Properties

PropertyTypeDefault valueDefined in
_isDisposedbooleanfalsegenerated/gaussian_process/kernels/Kernel.ts:19
_isInitializedbooleanfalsegenerated/gaussian_process/kernels/Kernel.ts:18
_pyPythonBridgeundefinedgenerated/gaussian_process/kernels/Kernel.ts:17
idstringundefinedgenerated/gaussian_process/kernels/Kernel.ts:14
optsanyundefinedgenerated/gaussian_process/kernels/Kernel.ts:15

Accessors

py

Get Signature

get py(): PythonBridge

Returns PythonBridge

Set Signature

set py(pythonBridge): void

Parameters

ParameterType
pythonBridgePythonBridge

Returns void

Defined in generated/gaussian_process/kernels/Kernel.ts:31

Methods

__call__()

__call__(opts): Promise<any>

Evaluate the kernel.

Parameters

ParameterType
optsobject

Returns Promise<any>

Defined in generated/gaussian_process/kernels/Kernel.ts:99


clone_with_theta()

clone_with_theta(opts): Promise<any>

Returns a clone of self with given hyperparameters theta.

Parameters

ParameterTypeDescription
optsobject-
opts.theta?ArrayLikeThe hyperparameters

Returns Promise<any>

Defined in generated/gaussian_process/kernels/Kernel.ts:125


diag()

diag(opts): Promise<ArrayLike>

Returns the diagonal of the kernel k(X, X).

The result of this method is identical to np.diag(self(X)); however, it can be evaluated more efficiently since only the diagonal is evaluated.

Parameters

ParameterTypeDescription
optsobject-
opts.X?ArrayLikeLeft argument of the returned kernel k(X, Y)

Returns Promise<ArrayLike>

Defined in generated/gaussian_process/kernels/Kernel.ts:159


dispose()

dispose(): Promise<void>

Disposes of the underlying Python resources.

Once dispose() is called, the instance is no longer usable.

Returns Promise<void>

Defined in generated/gaussian_process/kernels/Kernel.ts:82


init()

init(py): Promise<void>

Initializes the underlying Python resources.

This instance is not usable until the Promise returned by init() resolves.

Parameters

ParameterType
pyPythonBridge

Returns Promise<void>

Defined in generated/gaussian_process/kernels/Kernel.ts:44


is_stationary()

is_stationary(opts): Promise<any>

Returns whether the kernel is stationary.

Parameters

ParameterType
optsobject

Returns Promise<any>

Defined in generated/gaussian_process/kernels/Kernel.ts:191