clusDist: calculate distance between clustering results

Description Usage Arguments Examples

Description

calculate distance between clustering results

Usage

1
clusDist(clustering1, clustering2, ..., diag = FALSE, upper = FALSE)

Arguments

clustering1

result of some clustering, for example output from hclust(). A clustering can also be an n by m matrix, where n is the number of data points and m is the number of levels in the clustering hierarchy.

clustering2

result of a second clustering, to be combined with the first.

...

results of other clustering methods, to be combined with the first two.

diag

whether to plot the diagonal of distance matrix

upper

whether to plot the upper half of diagonal matrix

Examples

1
2
3
4
5
6
7
8
data <- rbind(matrix(rnorm(100, mean = 10, sd = 2), nrow = 50),
              matrix(rnorm(100, mean = 0, sd = 1), nrow = 50),
              matrix(rnorm(100, mean = -10, sd = 3), nrow = 50)
              )
clustering1 <- stats::hclust(dist(data),method='single')
clustering2 <- kmeans(data,centers=3)
clustering3 <- dbscan::dbscan(data,eps=.8)
res <- clusDist(clustering1,clustering2,clustering3)

rwoldford/trec documentation built on May 15, 2019, 6:29 p.m.