Skip to content

DotProduct

Defined in: ds/src/ml/kernels/dot-product.js:15

Abstract base class for GP kernels

Extends

Constructors

Constructor

new DotProduct(sigma0OrOpts?): DotProduct

Defined in: ds/src/ml/kernels/dot-product.js:24

Parameters

sigma0OrOpts?

any = 1.0

Inhomogeneity term, or { sigma0 }.

Returns

DotProduct

Example

new DotProduct(1.0)
new DotProduct({ sigma0: 1.0 })

Overrides

Kernel.constructor

Properties

sigma0

sigma0: any

Defined in: ds/src/ml/kernels/dot-product.js:27

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/dot-product.js:33

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/dot-product.js:39

Get kernel hyperparameters

Returns

object

Hyperparameters

sigma0

sigma0: any

Overrides

Kernel.getParams


setParams()

setParams(params?): void

Defined in: ds/src/ml/kernels/dot-product.js:43

Set kernel hyperparameters

Parameters

params?

New parameters

Returns

void

Overrides

Kernel.setParams