Skip to contents

Performs several runs of function 'vegclust' on a community data matrix using an increasing number of clusters until some conditions are met.

Usage

incr.vegclust(x, method="NC", ini.fixed.centers = NULL, 
              min.size = 10, max.var=NULL, alpha = 0.5, 
              nstart=100, fix.previous = TRUE, dnoise=0.75, m=1.0,...)

Arguments

x

Community data table. A site (rows) by species (columns) matrix or data frame.

method

A clustering model. Current accepted models are of the noise clustering family:

  • "NC": Noise clustering (Dave and Krishnapuram 1997)

  • "NCdd": Noise clustering with medoids

  • "HNC": Hard noise clustering

  • "HNCdd": Hard noise clustering with medoids

ini.fixed.centers

The coordinates of initial fixed cluster centers. These will be used as fixedCenters in all calls to vegclust. If method="NCdd" or method="HNCdd" then ini.fixed.centers can be specified as a vector of indices for medoids.

min.size

The minimum size (cardinality) of clusters. If any of the current k clusters does not have enough members the algorithm will stop and return the solution with k-1 clusters.

max.var

The maximum variance allowed for clusters (see function clustvar). If specified, the algorithm will stop when any of the clusters is at the same time small and has large variance. If max.var = NULL then this criterion is not used.

alpha

Criterion to choose cluster seeds from the noise class. Specifically, an object is considered as cluster seed if the membership to the noise class is larger than alpha.

nstart

A number indicating how many random trials should be performed for number of groups. Each random trial uses the k-1 cluster centers plus the coordinates of the current cluster seed as initial solution for vegclust. Thus, if there are less cluster seed candidates than nstart, then not all runs are conducted.

fix.previous

Flag used to indicate that the cluster centers found when determining k-1 clusters are fixed when determining k clusters.

m

The fuzziness exponent.

dnoise

The distance to the noise cluster.

...

Additional parameters for function vegclust.

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.

Value

Returns an object of class vegclust; or NULL if the initial cluster does not contain enough members.

Author

Miquel De Cáceres, CREAF

References

Davé, R. N. and R. Krishnapuram (1997) Robust clustering methods: a unified view. IEEE Transactions on Fuzzy Systems 5, 270-293.

Examples

## 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)), "/"))

## Call incremental noise clustering 
wetland.nc = incr.vegclust(wetland.chord, method="NC", m = 1.2, dnoise=0.75, 
                           min.size=5)
#> Vegclust with one new group...Number of remaining cluster seeds: 28
#> Vegclust with 2 new groups............................Number of remaining cluster seeds: 17
#> Vegclust with 3 new groups.................Number of remaining cluster seeds: 11
#> Vegclust with 4 new groups...........Number of remaining cluster seeds: 8
#> Some of the current clusters are too small. Returning vegclust with 3 new group(s).

## Inspect cluster sizes
print(wetland.nc$size)
#>        M1        F2        F3 
#>  6.021867 11.240696 12.704684