relate.levels: Relates two clustering level results.

View source: R/relate.levels.R

relate.levelsR Documentation

Relates two clustering level results.

Description

Analyzes how lower level clusters are assigned into upper level ones. The analysis is made for several number of clusters.

Usage

relate.levels(lower, upper, defuzzify = FALSE, excludeFixed = FALSE, verbose=FALSE, ...)

Arguments

lower

A list of objects of type vegclust or vegclass that represent classifications at a finer level of resolution.

upper

A list of objects of type vegclust or vegclass that represent classifications at an broader level of resolution.

defuzzify

A logical flag used to indicate whether the result of calling crossmemb should be deffuzified.

excludeFixed

A logical used to indicate whether fixed clusters should be excluded from the comparison of levels.

verbose

A flag used to ask for extra screen output.

...

Additional parameters for function defuzzify.

Details

For each pair of vegclust (or vegclass) objects in upper and lower, the function calls function crossmemb and then, if asked, deffuzifies the resulting memberships (by calling function defuzzify) and several quantities are calculated (see 'value' section).

Value

A list with several data frames (see below). In each of them, the rows are items of upper and columns are items of lower. The names of rows and columns are the number of clusters of each vegclust (or vegclass) object.

nnoise

The number of low level clusters that are assigned to the Noise class (for upper objects using Noise clustering).

maxnoise

The maximum membership value of low level clusters to the Noise class (for upper objects using Noise clustering).

minmaxall

The minimum value (across upper level clusters) of the maximum membership value observed among the lower level clusters.

minallsize

The minimum value (across upper level clusters) of the sum of membership values across lower level clusters.

empty

The number of upper level clusters (mobile or fixed) that do not have any member among the lower level clusters.

Author(s)

Miquel De Cáceres, CREAF

See Also

vegclust, vegclass, defuzzify

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 noise clustering from hierarchical clustering at different number of cluster
wetland.hc = hclust(dist(wetland.chord),method="ward") 
wetland.nc1 = hier.vegclust(wetland.chord, wetland.hc, cmin=2, cmax=6, m = 1.2, 
                            dnoise=0.75, method="NC")
wetland.nc2 = hier.vegclust(wetland.chord, wetland.hc, cmin=2, cmax=4, m = 1.2, 
                            dnoise=0.85, method="NC")

## Studies the assignment of levels
relate.levels(wetland.nc1, wetland.nc2, method="cut")

emf-creaf/vegclust documentation built on July 27, 2024, 7:32 a.m.