DocumentationClassesExpSineSquared

Class: ExpSineSquared

Exp-Sine-Squared kernel (aka periodic kernel).

The ExpSineSquared kernel allows one to model functions which repeat themselves exactly. It is parameterized by a length scale parameter \(l>0\) and a periodicity parameter \(p>0\). Only the isotropic variant where \(l\) is a scalar is supported at the moment. The kernel is given by:

Python Reference

Constructors

new ExpSineSquared()

new ExpSineSquared(opts?): ExpSineSquared

Parameters

ParameterTypeDescription
opts?object-
opts.length_scale?anyThe length scale of the kernel.
opts.length_scale_bounds?"fixed"The lower and upper bound on ‘length_scale’. If set to “fixed”, ‘length_scale’ cannot be changed during hyperparameter tuning.
opts.periodicity?anyThe periodicity of the kernel.
opts.periodicity_bounds?"fixed"The lower and upper bound on ‘periodicity’. If set to “fixed”, ‘periodicity’ cannot be changed during hyperparameter tuning.

Returns ExpSineSquared

Defined in generated/gaussian_process/kernels/ExpSineSquared.ts:23

Properties

PropertyTypeDefault valueDefined in
_isDisposedbooleanfalsegenerated/gaussian_process/kernels/ExpSineSquared.ts:21
_isInitializedbooleanfalsegenerated/gaussian_process/kernels/ExpSineSquared.ts:20
_pyPythonBridgeundefinedgenerated/gaussian_process/kernels/ExpSineSquared.ts:19
idstringundefinedgenerated/gaussian_process/kernels/ExpSineSquared.ts:16
optsanyundefinedgenerated/gaussian_process/kernels/ExpSineSquared.ts:17

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/ExpSineSquared.ts:52

Methods

__call__()

__call__(opts): Promise<ArrayLike[]>

Return the kernel k(X, Y) and optionally its gradient.

Parameters

ParameterTypeDescription
optsobject-
opts.eval_gradient?booleanDetermines whether the gradient with respect to the log of the kernel hyperparameter is computed. Only supported when Y is undefined.
opts.X?ArrayLike[]Left argument of the returned kernel k(X, Y)
opts.Y?ArrayLike[]Right argument of the returned kernel k(X, Y). If undefined, k(X, X) if evaluated instead.

Returns Promise<ArrayLike[]>

Defined in generated/gaussian_process/kernels/ExpSineSquared.ts:121


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/ExpSineSquared.ts:165


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?ArrayLike[]Left argument of the returned kernel k(X, Y)

Returns Promise<ArrayLike>

Defined in generated/gaussian_process/kernels/ExpSineSquared.ts:201


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/ExpSineSquared.ts:104


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/ExpSineSquared.ts:65


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/ExpSineSquared.ts:233