Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

crossmemb

Cross-table of two fuzzy classifications


Description

Calculates a cross-tabulated matrix relating two fuzzy membership matrices

Usage

crossmemb(x, y, relativize = TRUE)

Arguments

x

A site-by-group fuzzy membership matrix. Alternatively, an object of class 'vegclust' or 'vegclass'.

y

A site-by-group fuzzy membership matrix. Alternatively, an object of class 'vegclust' or 'vegclass'.

relativize

If TRUE expresses the cross-tabulated values as proportions of cluster size in x.

Value

A cross-tabulated matrix comparing the two classifications. In general, each cell's value is the (fuzzy) number of objects that in x are assigned to the cluster corresponding to the row and in y are assigned to the cluster corresponding to the column. If relativize=TRUE then the values of each row are divided by the (fuzzy) size of the corresponding cluster in x.

Author(s)

Miquel De Cáceres, Forest Science Center of Catalonia.

See Also

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


## Create clustering with 3 clusters. Perform 10 starts from random seeds 
## and keep the best solution. Try both FCM and NC methods:
wetland.fcm = vegclust(wetland.chord, mobileCenters=3, m = 1.2, method="FCM", nstart=10)
wetland.nc = vegclust(wetland.chord, mobileCenters=3, m = 1.2, dnoise=0.75, method="NC", 
                      nstart=10)

## Compare the results
crossmemb(wetland.fcm, wetland.nc, relativize=FALSE)

vegclust

Fuzzy Clustering of Vegetation Data

v1.7.7
GPL (>= 2)
Authors
Miquel De Cáceres [aut, cre]
Initial release
2019-01-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.