Learn R Programming

EcotoneFinder (version 0.2.3)

clustergram.cmeans.Ind: cmeans clustering with fuzzy indices computation for clustergram

Description

cmeans clustering with fuzzy indices computation for clustergram

Usage

clustergram.cmeans.Ind(Data, k, method = "cmeans", ...)

Arguments

Data

Should be a scales matrix. Where each column belongs to a different dimension of the observations.

k

Number of desired groups for the FCM clustering.

method

Clustering method for the cmeans function.

...

Additional parameters to be passed to the cmeans function.

Value

A list containing the cluster vector, the centers matrix and a vector of four fuzzy indices (partition coefficient (PC), normalized partition coefficient (PCN), partition entropy (PE) and normalized partition entropy (PEN)). See vegclust and veclustIndex functions.

Details

Additionally to the FCM clustering with the cmeans function (e1071 package), the function compute the main fuzzy indices to help with the decision on the optimal number of cluster in the data. The indices are computed with the vegclustIndex function of the vegclust package. Maximum values of PCN or minimum values of PEN can be used as criteria to choose the number of clusters.

Examples

Run this code
# NOT RUN {
  ####### Example data:
   SyntheticTrial <- SyntheticData(SpeciesNum = 100,
                                   CommunityNum = 3, SpCo = NULL,
                                   Length = 500,
                                   Parameters = list(a=c(40, 80, 50),
                                                     b=c(100,250,400),
                                                     c=rep(0.03,3)),
                                   dev.c = .015, pal = c("#008585", "#FBF2C4", "#C7522B"))

   ######## clustergram plots with fuzzy indices plots:
   clustergramInd(as.matrix(SyntheticTrial[,2:ncol(SyntheticTrial)]),
                                 clustering.function = clustergram.cmeans.Ind,
                                 clustergram.plot = clustergram.plot.matlines,
                                 FuzzyIndice.plot = FuzzyIndice.plot.matlines,
                                 k.range = 2:10, line.width = .2)
 
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab