Learn R Programming

GPFDA (version 3.1.3)

distanceMatrix: Calculate generalised distances

Description

Calculate the generalised distance between vectors t and t' using an anisotropy matrix A.

  • distMat and distMatSq calculate: $$ [(t - t')^{p/2}]^T A (t - t')^{p/2} $$

  • distMatLinear and distMatLinearSq calculate: $$ t^T A t' $$

Usage

distMat(input, inputNew, A, power)

distMatSq(input, A, power)

distMatLinear(input, inputNew, A)

distMatLinearSq(input, A)

Value

A matrix

Arguments

input

Vector of the input coordinate t

inputNew

Vector of the input coordinate t'

A

Anisotropy matrix A

power

Power value p

Details

The distMatSq and distMatLinearSq functions are used when input vectors t and t' are identical, returning a symmetric matrix.

When distMat and distMatSq functions are used in powered exponential kernels, power=1 gives the exponential kernel and power=2 gives the squared exponential one.

distMatLinear and distMatLinearSq functions are used in the linear covariance kernel.