incr.vegclust.Rd
Performs several runs of function 'vegclust' on a community data matrix using an increasing number of clusters until some conditions are met.
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,...)
Community data table. A site (rows) by species (columns) matrix or data frame.
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
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.
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.
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.
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
.
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.
Flag used to indicate that the cluster centers found when determining k-1 clusters are fixed when determining k clusters.
The fuzziness exponent.
The distance to the noise cluster.
Additional parameters for function vegclust
.
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.
Returns an object of class vegclust
; or NULL
if the initial cluster does not contain enough members.
Davé, R. N. and R. Krishnapuram (1997) Robust clustering methods: a unified view. IEEE Transactions on Fuzzy Systems 5, 270-293.
## 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.021874 11.240876 12.704787