cluster_dist {RMaCzek} | R Documentation |
Calculate the distance matrix between clusters.
Description
Calculate the distance matrix for a czek_matrix with clustering result or a data set with its clustering labels.
Usage
cluster_dist(x, y, distfun = dist, dist_method = "average")
Arguments
x |
A data set or a matrix with class czek_matrix. |
y |
If x is the data set, y is the cluster label. |
distfun |
Specifies which distance function should be used. |
dist_method |
Four linkage criteria: single, complete, average and SSD. |
Value
A distance matrix.
Examples
# Clustering Result on czek_matrix
x = czek_matrix(iris[,-5], cluster = TRUE, num_cluster = 3)
dist_czek = cluster_dist(x)
plot(czek_matrix(dist_czek))
# Clustering Result on a Data Set with Clustering Labels
dist_data = cluster_dist(x = iris[,-5], y = iris$Species)
plot(czek_matrix(dist_data))
[Package RMaCzek version 1.6.0 Index]