Classifies vegetation communities into a previous fuzzy or hard classification.
Arguments
- y
An object of class
vegclustthat represents a previous knowledge.- x
Community data to be classified, in form of a site by species matrix (if the vegclust object is in
rawmode) or a data frame containing the distances between the new sites in rows and the old sites in columns (if thevegclustobject is indistancemode).
Value
Returns an object of type vegclass with the following items:
method: The clustering model used inym: The fuzziness exponent inydnoise:The distance to the noise cluster used for noise clustering (models NC, NCdd, HNC, HNCdd). This is set toNULLfor other models.eta: The reference distance vector used for possibilistic clustering (models PCM and PCMdd). This is set toNULLfor other models.memb: The fuzzy membership matrix.dist2clusters: The matrix of object distances to cluster centers.
Details
This function uses the classification model specified in y to classify the communities (rows) in x. When vegclust is in raw mode, the function calls first to conformveg in order to cope with different sets of species. See the help of as.vegclust to see an example of vegclass with distance matrices.
References
Davé, R. N. and R. Krishnapuram (1997) Robust clustering methods: a unified view. IEEE Transactions on Fuzzy Systems 5, 270-293.
Bezdek, J. C. (1981) Pattern recognition with fuzzy objective functions. Plenum Press, New York.
Krishnapuram, R. and J. M. Keller. (1993) A possibilistic approach to clustering. IEEE transactions on fuzzy systems 1, 98-110.
De Cáceres, M., Font, X, Oliva, F. (2010) The management of numerical vegetation classifications with fuzzy clustering methods [Related software]. Journal of Vegetation Science 21 (6): 1138-1151.
Examples
## Loads data (38 columns and 33 species)
data(wetland)
## This equals the chord transformation
wetland.chord <- as.data.frame(sweep(as.matrix(wetland), 1,
sqrt(rowSums(as.matrix(wetland)^2)), "/"))
## Splits wetland data into two matrices of 30x27 and 11x22
wetland.30 <- wetland.chord[1:30,]
wetland.30 <- wetland.30[,colSums(wetland.30)>0]
dim(wetland.30)
#> [1] 30 27
wetland.11 <- wetland.chord[31:41,]
wetland.11 <- wetland.11[,colSums(wetland.11)>0]
dim(wetland.11)
#> [1] 11 22
## Create noise clustering with 3 clusters from the data set with 30 sites.
wetland.30.nc <- vegclust(wetland.30, mobileCenters=3, m = 1.2, dnoise=0.75,
method="NC", nstart=10)
## Cardinality of fuzzy clusters (i.e., the number of objects belonging to)
wetland.30.nc$size
#> M1 M2 M3
#> 10.188173 8.985131 4.434558
## Classifies the second set of sites according to the clustering of the first set
wetland.11.nc <- vegclass(wetland.30.nc, wetland.11)
## Fuzzy membership matrix
wetland.11.nc$memb
#> M1 M2 M3 N
#> 26 0.105685961 0.0045236875 0.0033669216 0.88642343
#> 29 0.150974882 0.0065393301 0.0045768819 0.83790891
#> 33 0.935518312 0.0003252076 0.0002398704 0.06391661
#> 24 0.021754156 0.0049611648 0.0037472206 0.96953746
#> 36 0.099864565 0.0050155850 0.0041759800 0.89094387
#> 37 0.009533221 0.0061170085 0.0049207738 0.97942900
#> 41 0.009665246 0.0340182318 0.0108971494 0.94541937
#> 27 0.006260509 0.0037323210 0.0033883011 0.98661887
#> 32 0.010461589 0.0054301953 0.0045329270 0.97957529
#> 35 0.026084209 0.2221661740 0.0203855023 0.73136411
#> 38 0.004623398 0.7089774056 0.0137079221 0.27269127
## Obtains hard membership vector, with 'N' for objects that are unclassified
defuzzify(wetland.11.nc$memb)$cluster
#> 26 29 33 24 36 37 41 27 32 35 38
#> "N" "N" "M1" "N" "N" "N" "N" "N" "N" "N" "M2"
