clsupport: Support of Branches of Hierarchical Clustering from Beta...

clsupportR Documentation

Support of Branches of Hierarchical Clustering from Beta Jaccard

Description

Function performs hierarchic clustering (hclust) with the expected value of Jaccard dissimilarity as Beta random variate, and compares the stability of each cluster branch in random samples from Beta distribution.

Usage

clsupport(x, n = 1000, method = "average", softmatch = FALSE, plot = TRUE, ...)

clsets(hclus)

Arguments

x

Community data, will be treated as binary.

n

Number of random samples from Beta distribution.

method

Clustering method, passed to hclust.

softmatch

Estimate cluster similarity as Jaccard similarity or as a hard exact match between two clusters.

plot

Plot the hclust dendrogram from expected Jaccard dissimilarity with each brand labelled with support.

...

Other parameters; passed to plot.hclust.

hclus

hclust result object.

Details

Function is basically a graphical tool that plots an hclust dendrogram and adds the count of similar clusters in randomized cluster dendrograms, but it can also be called only for the numeric result without plot.

The count of similar clusters in trees is based on randomized form Jaccard Beta dissimilarities, and is called here “support”. The support is calculated alternatively as the number of exactly similar branches in randomized trees or as a sum of maximum Jaccard similarities in observed and randomized trees (“softmatch”). The exact matches are very sensitive to single wandering sampling units, and often give very low “support” for large classes, whereas Jaccard-based “support” may give too high values for the smallest classes. For exact matches the “support” is given as count, and for soft maches (Jaccard-based) as a rounded integer per 1000.

Value

Usually called to draw a plot, but will return the “support”; the values are returned in the order of merges in the agglomerative hierarchic clustering. Function clsets returns a list with indices of items (sampling units) of each branch in their merge order.

See Also

hclust, bayesjaccard.

Examples


data(spurn)
clsupport(spurn) # exact match
clsupport(spurn, softmatch = TRUE)



jarioksa/natto documentation built on March 28, 2024, 12:45 a.m.