calcUncertaintyIndex: Diversity index In geocmeans: Implementing Methods for Spatial Fuzzy Unsupervised Classification

 calcUncertaintyIndex R Documentation

Diversity index

Description

Calculate the diversity (or entropy) index.

Usage

calcUncertaintyIndex(belongmatrix)


Arguments

 belongmatrix A membership matrix

Details

The diversity (or entropy) index \insertCitetheil1972statisticalgeocmeans is calculated for each observation an varies between 0 and 1. When the value is close to 0, the observation belong to only one cluster (as in hard clustering). When the value is close to 1, the observation is undecided and tends to belong to each cluster. Values above 0.9 should be investigated. The formula is:

H2_{i} = \frac{-∑[u_{ij}\ln(u_{ij})]}{\ln(k)}

with i and observation, j a cluster, k the number of clusters and u the membership matrix.

It is a simplified formula because the sum of each row of a membership matrix is 1.

Value

A vector with the values of the diversity (entropy) index

\insertAllCited

Examples

data(LyonIris)
AnalysisFields <-c("Lden","NO2","PM25","VegHautPrt","Pct0_14","Pct_65","Pct_Img",
"TxChom1564","Pct_brevet","NivVieMed")
dataset <- sf::st_drop_geometry(LyonIris[AnalysisFields])
queen <- spdep::poly2nb(LyonIris,queen=TRUE)
Wqueen <- spdep::nb2listw(queen,style="W")
result <- SFCMeans(dataset, Wqueen,k = 5, m = 1.5, alpha = 1.5, standardize = TRUE)
calcUncertaintyIndex(result\$Belongings)


geocmeans documentation built on Oct. 16, 2022, 1:07 a.m.