Skip to content

RationalQuadratic

Defined in: ds/src/ml/kernels/rational-quadratic.js:15

Abstract base class for GP kernels

Extends

Constructors

Constructor

new RationalQuadratic(lengthScaleOrOpts?, alpha?, variance?): RationalQuadratic

Defined in: ds/src/ml/kernels/rational-quadratic.js:21

Parameters

lengthScaleOrOpts?

any = 1.0

Length scale or options object

alpha?

number = 1.0

Scale mixture parameter (default: 1.0)

variance?

number = 1.0

Signal variance (default: 1.0)

Returns

RationalQuadratic

Overrides

Kernel.constructor

Properties

alpha

alpha: any

Defined in: ds/src/ml/kernels/rational-quadratic.js:32


lengthScale

lengthScale: any

Defined in: ds/src/ml/kernels/rational-quadratic.js:31


variance

variance: any

Defined in: ds/src/ml/kernels/rational-quadratic.js:33

Methods

call()

call(X1, X2?): Matrix

Defined in: ds/src/ml/kernels/base.js:30

Compute covariance matrix between sets of points

Parameters

X1

any

First set of points (n1 x d)

X2?

any = null

Second set of points (n2 x d). If omitted, computes K(X1, X1)

Returns

Matrix

Covariance matrix (n1 x n2)

Inherited from

Kernel.call


clone()

clone(): Kernel

Defined in: ds/src/ml/kernels/base.js:76

Clone the kernel with the same parameters

Returns

Kernel

New kernel instance

Inherited from

Kernel.clone


compute()

compute(x1, x2): number

Defined in: ds/src/ml/kernels/rational-quadratic.js:41

Compute covariance between two points

Parameters

x1

any

First point

x2

any

Second point

Returns

number

Covariance value

Overrides

Kernel.compute


getParams()

getParams(): object

Defined in: ds/src/ml/kernels/rational-quadratic.js:51

Get kernel hyperparameters

Returns

object

Hyperparameters

alpha

alpha: any

lengthScale

lengthScale: any

variance

variance: any

Overrides

Kernel.getParams


setParams()

setParams(params): void

Defined in: ds/src/ml/kernels/rational-quadratic.js:59

Set kernel hyperparameters

Parameters

params

New parameters

alpha

any

amplitude

any

lengthScale

any

variance

any

Returns

void

Overrides

Kernel.setParams