gputools (version 1.1)

gpuHclust: Perform Hierarchical Clustering for Vectors with a GPU

Description

This function performs clustering on a set of points. The distance between each pair of points should be calculated first using a function like 'gpuDist' or 'dist'.

Usage

gpuHclust(distances, method = "complete")

Arguments

distances
a class of type "dist" containing floating point numbers representing distances between points. R's native dist function and the gpuDist function produce output of this type.
method
a string representing the name of the clustering method to be applied to distances. Currently supported method names include "average", "centroid", "complete", "flexible", "flexible group", "mcquitty", "median", "single", "ward", and "wpgma".

Value

type "hclust" with the following attributes.

See Also

hclust, gpuDistClust

Examples

Run this code
numVectors <- 5
dimension <- 10
Vectors <- matrix(runif(numVectors*dimension), numVectors, dimension)
distMat <- gpuDist(Vectors, "euclidean")
myClust <- gpuHclust(distMat, "single")
plot(myClust)

Run the code above in your browser using DataCamp Workspace