Skip to content

Latest commit

 

History

History
266 lines (156 loc) · 7.82 KB

RationalQuadratic.md

File metadata and controls

266 lines (156 loc) · 7.82 KB

RationalQuadratic

Rational Quadratic kernel.

The RationalQuadratic kernel can be seen as a scale mixture (an infinite sum) of RBF kernels with different characteristic length scales. It is parameterized by a length scale parameter \(l>0\) and a scale mixture parameter \(\alpha>0\). Only the isotropic variant where length_scale \(l\) is a scalar is supported at the moment. The kernel is given by:

Python Reference

Constructors

constructor()

Signature

new RationalQuadratic(opts?: object): RationalQuadratic;

Parameters

Name Type Description
opts? object -
opts.alpha? any Scale mixture parameter Default Value 1
opts.alpha_bounds? "fixed" The lower and upper bound on ‘alpha’. If set to “fixed”, ‘alpha’ cannot be changed during hyperparameter tuning.
opts.length_scale? any The length scale of the kernel. Default Value 1
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.

Returns

RationalQuadratic

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

Methods

__call__()

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

Signature

__call__(opts: object): Promise<ArrayLike[]>;

Parameters

Name Type Description
opts object -
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.
opts.eval_gradient? boolean Determines whether the gradient with respect to the log of the kernel hyperparameter is computed. Only supported when Y is undefined. Default Value false

Returns

Promise<ArrayLike[]>

Defined in: generated/gaussian_process/kernels/RationalQuadratic.ts:126

clone_with_theta()

Returns a clone of self with given hyperparameters theta.

Signature

clone_with_theta(opts: object): Promise<any>;

Parameters

Name Type Description
opts object -
opts.theta? ArrayLike The hyperparameters

Returns

Promise<any>

Defined in: generated/gaussian_process/kernels/RationalQuadratic.ts:177

diag()

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.

Signature

diag(opts: object): Promise<ArrayLike>;

Parameters

Name Type Description
opts object -
opts.X? ArrayLike[] Left argument of the returned kernel k(X, Y)

Returns

Promise<ArrayLike>

Defined in: generated/gaussian_process/kernels/RationalQuadratic.ts:217

dispose()

Disposes of the underlying Python resources.

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

Signature

dispose(): Promise<void>;

Returns

Promise<void>

Defined in: generated/gaussian_process/kernels/RationalQuadratic.ts:109

init()

Initializes the underlying Python resources.

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

Signature

init(py: PythonBridge): Promise<void>;

Parameters

Name Type
py PythonBridge

Returns

Promise<void>

Defined in: generated/gaussian_process/kernels/RationalQuadratic.ts:65

is_stationary()

Returns whether the kernel is stationary.

Signature

is_stationary(opts: object): Promise<any>;

Parameters

Name Type
opts object

Returns

Promise<any>

Defined in: generated/gaussian_process/kernels/RationalQuadratic.ts:252

Properties

_isDisposed

boolean = false

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

_isInitialized

boolean = false

Defined in: generated/gaussian_process/kernels/RationalQuadratic.ts:20

_py

PythonBridge

Defined in: generated/gaussian_process/kernels/RationalQuadratic.ts:19

id

string

Defined in: generated/gaussian_process/kernels/RationalQuadratic.ts:16

opts

any

Defined in: generated/gaussian_process/kernels/RationalQuadratic.ts:17

Accessors

hyperparameter_alpha

Signature

hyperparameter_alpha(): Promise<any>;

Returns

Promise<any>

Defined in: generated/gaussian_process/kernels/RationalQuadratic.ts:279

hyperparameter_length_scale

Signature

hyperparameter_length_scale(): Promise<any>;

Returns

Promise<any>

Defined in: generated/gaussian_process/kernels/RationalQuadratic.ts:303

py

Signature

py(): PythonBridge;

Returns

PythonBridge

Defined in: generated/gaussian_process/kernels/RationalQuadratic.ts:52

Signature

py(pythonBridge: PythonBridge): void;

Parameters

Name Type
pythonBridge PythonBridge

Returns

void

Defined in: generated/gaussian_process/kernels/RationalQuadratic.ts:56