Learn R Programming

clusterv (version 1.1.1)

Multiple.Random.hclustering: Multiple Random hierarchical clustering

Description

Multiple Random hierarchical clusterings are computed using random projections of data. It assumes that the label of the examples are integers starting from 1 to ncol(M). Several randomized maps may be used: RS, PMO, Normal and Achlioptas random projections.

Usage

Multiple.Random.hclustering(M, dim, pmethod = "RS", c = 3, hmethod = "average", 
                            n = 50, scale = TRUE, seed = 100, distance="euclidean")

Value

a list of the n clusterings obtained by randomized hierarchical clustering. Each clustering is a list vector, and each vector represents a single cluster. The elements of the vectors are integers that corresponds to the number of the columns (examples) of the matrix M of the data.

Arguments

M

matrix of data: rows are variables and columns are examples

dim

subspace dimension

pmethod

projection method. It must be one of the following: "RS" (random subspace projection) "PMO" (Plus Minus One random projection) "Norm" (normal random projection) "Achlioptas" (Achlioptas random projection)

c

number of clusters

hmethod

the agglomeration method to be used. This should be one of "ward.D", "single", "complete", "average", "mcquitty", "median" or "centroid", according to the hclust method of the package stats.

n

number of random projections

scale

if TRUE (default) the random projections are scaled

seed

numerical seed for the random generator

distance

it must be one of the two: "euclidean" (default) or "pearson" (that is 1 - Pearson correlation)

Author

Giorgio Valentini valentini@di.unimi.it

See Also

Achlioptas.random.projection, Plus.Minus.One.random.projection,

norm.random.projection,random.subspace

Examples

Run this code
# \donttest{
# Multiple (20) hierarchical clusterings using Normal projections. 
M <- generate.sample0(n=10, m=2, sigma=2, dim=800)
l.norm <- Multiple.Random.hclustering (M, dim=100, pmethod="Norm", 
                                       c=3, hmethod="average", n=20)
# The same as above, using Random Subspace projections.
l.RS <-  Multiple.Random.hclustering (M, dim=100, pmethod="RS", c=3, 
                                      hmethod="average", n=20)
# The same as above, using PMO projections, but with the number of clusters set to 5
l.RS <-  Multiple.Random.hclustering (M, dim=100, pmethod="PMO", c=5, 
                                      hmethod="average", n=20)
# The same as above, using the single linkage method
l.RS.single <-  Multiple.Random.hclustering (M, dim=100, pmethod="PMO", 
                                             c=5, hmethod="single", n=20)
# }

Run the code above in your browser using DataLab