rpuDist {rpud} | R Documentation |
This function computes the distance between each vector of the 'points' argument using the metric specified by 'method'.
rpuDist(points, method = "euclidean", diag = FALSE, upper = FALSE, p = 2)
points |
a matrix of floating point numbers in which each row is a vector in $R^n$ space where $n$ is ncol(points). |
method |
a string representing the name of the metric to use to
calculate the distance between the vectors of 'points'. Currently
supported values are: |
diag |
logical value indicating whether the diagonal of the
distance matrix should be printed by |
upper |
logical value indicating whether the upper triangle of the
distance matrix should be printed by |
p |
The power of the Minkowski distance. |
Compute the distance matrix with GPU. The processing capacity of rpud is confined by the GPU device memory by default. With the rpudplus add-on, rpud will make use of the system RAM, and can handle much larger data sets.
a class of type "dist" containing floating point numbers representing the distances between vectors from the 'points' argument.
dist, gpuDist
## Not run:
numVectors <- 5
dimension <- 10
Vectors <- matrix(runif(numVectors*dimension), numVectors, dimension)
rpuDist(Vectors, "euclidean")
rpuDist(Vectors, "maximum")
rpuDist(Vectors, "manhattan")
rpuDist(Vectors, "canberra")
rpuDist(Vectors, "binary")
rpuDist(Vectors, "minkowski")
## End(Not run)