distance {GPBayes} | R Documentation |
Compute distances for two sets of inputs
Description
This function computes distances for two sets of inputs and returns
a R
object.
Usage
distance(input1, input2, type = "isotropic", dtype = "Euclidean")
Arguments
input1 |
a matrix of inputs |
input2 |
a matrix of inputs |
type |
a string indicating the form of distances with three froms supported currently: isotropic, tensor, ARD. |
dtype |
a string indicating distance type: Euclidean, GCD, where the latter indicates great circle distance. |
Value
a R object holding distances for two sets of inputs. If type is isotropic, a matrix of distances is returned; if type is tensor or ARD, a list of distance matrices along each input dimension is returned.
a numeric vector or matrix of distances
Author(s)
Pulong Ma mpulong@gmail.com
Examples
input = seq(0,1,length=20)
d = distance(input, input, type="isotropic", dtype="Euclidean")
[Package GPBayes version 0.1.0-6 Index]