from.Leaders: Returns List to Help Chaining Leaders and Hierarchical...

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

View source: R/fromLeaders.R

Description

Computes list that allows to start hierarchical method with leaders from leaders method (takes size and units of clusters from leaders method into consideration)

Usage

1
from.Leaders(data, clustering, as.probs = FALSE, penalty = 1e+06)

Arguments

data

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

clustering

Clustering (vector) that one get from leaders method - vector of units with cluster numbers.

as.probs

TRUE if rows represent probabilities and FALSE otherwise.

penalty

Parameter to specify how should division with zero be treated.

Details

Function computes a list that can be used as input into hierarch method when one chains it after leaders method. It takes care of sizes for each cluster (from leaders method), for sum of units and for harmonic sum of units (for each cluster).

Value

The result is a list of

size

Vector of sizes for each cluster that one gets from leaders method.

sum

Matrix of summed units for every cluster that one gets from leaders method.

harmonic

Matrix of harmonic sum of units that one gets from leaders method.

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

hierarch,leaders,kmeans from standard package, pam from package cluster

Examples

1
2
3
4
5
6
7
8
data(patents)
centers <- 10
leaders_clust <- leaders(patents[1:40,], centers=centers)
# get the list
fL <- from.Leaders(patents[1:40,],leaders_clust$clustering)
# input the list into hierarch
hier_clust <- hierarch(leaders_clust$centers,fromLeaders=fL)
plot(hier_clust$object)

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