Partition analysis evaluates the within-cluster to among-cluster similarity of classifications as a measure of cluster validity
partana(c,dist)
# S3 method for partana
summary(object, …)
# S3 method for partana
plot(x,panel='all',zlim=range(x$ptc),col=heat.colors(12),…)
an integer or factor vector, or an object of class ‘clustering’, ‘partana’, ‘partition’, or ‘stride’
an object of class ‘partana’
an object of class ‘partana’
an integer switch to indicate which panel to draw
the min and max values for the color map
a color map name (heat.colors(12) is the default)
ancillary arguments to pass to summary or plot
an object of class ‘partana’ with components:
matrix of mean object-to-cluster similarity
matrix of mean cluster-to-cluster similarity
vector of numeric cluster assignments
within-cluster to among-cluster similarity ratio
Calculates mean object-to-cluster similarity, mean cluster-to-cluster
similarity, and mean within-cluster to among-cluster similarity. partana operates
on partitions or clusterings produced by a wide range of algorithms, including specific
methods for the products of functions optpart
, slice
,
pam
and diana
.
summary
produces a matrix of the mean cluster-to-cluster similarities,
and the overall within-cluster/among-cluster similarity ratio.
plot
plots two panels in sequence in the current device. The first shows
the mean similarity of every object to each cluster, sorted by mean similarity
to the other members of its own cluster, with objects as columns and clusters
as rows. The second panel shows the mean similarity of every cluster to every
other cluster and mean within-cluster similarity, ignoring cluster size. These
plots are known as ‘Mondriaan’ plots, where the similarities are given by lines
colored from min to max. If the ‘partana’ object was produced by optpart, a
third panel is plotted showing the trace of the optimization.
# NOT RUN {
data(shoshveg)
data(shoshsite)
dis.bc <- dsvdis(shoshveg,'bray/curtis')
demo.part <- partana(cut(shoshsite$elev,5),dis.bc)
summary(demo.part)
# }
Run the code above in your browser using DataLab