hierarch: Clustering of Units with Adapted Hierarchical Clustering...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/hierarch.R

Description

Compute clustering with adapted hierarchical clustering method, adapted stands for different error functions that are computed between units and current leaders

Usage

1
hierarch(x, as.probs = TRUE, err.measure = "d4", penalty = 1e+06, nleaders = NULL, fromLeaders = NULL)

Arguments

x

Dataframe or matrix of units (in rows). Rows can represent probabilities or frequencies.

as.probs

TRUE if rows represent probabilities and FALSE otherwise.

err.measure

String for error function that will be used to calculate the error between current leader and a unit. Possibilities are from d1 to d7 (but not d2, see reference).

penalty

Parameter to specify how should division by zero be treated.

nleaders

How many leaders should be saved (NULL or between 1 and n (number of units)). Note: leaders cannot be always computed after the whole procedure.

fromLeaders

NULL or list that one gets from function from.Leaders in order to take size and units from leaders method into consideration.

Details

Function generates dissimilarity matrix (according to error function) and then in each step agglomerates the nearest two units, later clusters. This stops when all units are in the same cluster. Every step dissimilarity matrix is recomputed according to error functions (see reference for details).

Value

The result is a list of

object

S3 object used for hierarchical clustering procedure from base package stats. See hclust. This allows to use methods plot for dendrogram plot etc.

saved_leaders

Matrix of nleaders leaders.

...

Author(s)

Kejzar, N., Korenjak-Cerne, S. and Batagelj, V.

References

N. Kejzar, S. Korenjak-Cerne, and V. Batagelj: Clustering of distributions : A case of patent citations.J. classif., 2011, 28, doi: 10.1007/s00357-011-9084-x.

See Also

leaders from package clustDDist,hclust from standard package, agnes from package cluster

Examples

1
2
3
4
data(patents)
patents_short <- patents[1:20,] # to get shorter version of data
clust <- hierarch(patents_short,err.measure="d4",as.probs=FALSE)
plot(clust$object)

clustDDist documentation built on May 2, 2019, 6:47 p.m.