Clustering with several number of clusters

Share:

Description

Performs several runs of function 'vegclust' (or 'vegclustdist') on a community data matrix (or distance matrix) using different number of clusters

Usage

1
2
3
4
hier.vegclust(x, hclust, cmin=2,cmax=20, min.size=NULL, verbose=TRUE, ...)
hier.vegclustdist(x, hclust, cmin=2,cmax=20, min.size=NULL, verbose=TRUE, ...)
random.vegclust(x, cmin=2, cmax=20, nstart=10, min.size=NULL, verbose=TRUE, ...)
random.vegclustdist(x, cmin=2, cmax=20, nstart=10, min.size=NULL, verbose=TRUE, ...)

Arguments

x

For hier.vegclust and random.vegclust, a site (rows) by species (columns) matrix or data frame. For hier.vegclustdist and random.vegclustdist, a square distance matrix.

hclust

A hierarchical clustering represented in an object of type hclust.

cmin

Number of minimum mobile clusters.

cmax

Number of maximum mobile clusters.

nstart

A number indicating how many random trials should be performed for each number of groups

min.size

If min.size != NULL, it specifies the minimum size of clusters. If some clusters are smaller, the algorithm will return the solutions corresponding to lower numbers of clusters.

verbose

Flag used to print which number of clusters is currently running.

...

Additional parameters for function vegclust or vegclustdist.

Details

Function hier.vegclust takes starting cluster configurations from cuts of a dendrogram given by object hclust. Function random.vegclust chooses random objects as cluster centroids and for each number of clusters performs nstart trials. Functions hier.vegclustdist and random.vegclustdist are analogous to hier.vegclust and random.vegclust but accept distance matrices as input.

Value

Returns an object of type 'mvegclust' (multiple vegclust), which contains a list vector with objects of type vegclust.

Author(s)

Miquel De Cáceres, Forest Science Center of Catalonia

See Also

vegclust, vegclustdist, vegclass, defuzzify, hclust

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Loads data  
data(wetland)
  
## This equals the chord transformation 
## (see also  \code{\link{decostand}} in package vegan)
wetland.chord = as.data.frame(sweep(as.matrix(wetland), 1, 
                              sqrt(rowSums(as.matrix(wetland)^2)), "/"))

## Create noise clustering from hierarchical clustering at different number of clusters
wetland.hc = hclust(dist(wetland.chord),method="ward") 
wetland.nc1 = hier.vegclust(wetland.chord, wetland.hc, cmin=2, cmax=5, 
                            m = 1.2, dnoise=0.75, method="NC")

## Create noise clustering from random seeds at different levels
wetland.nc2 = random.vegclust(wetland.chord, cmin=2, cmax=5, nstart=10,
                              m = 1.2, dnoise=0.75, method="NC")

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.