calcNegentropyI: Negentropy Increment index

View source: R/clustering_evaluation.R

calcNegentropyIR Documentation

Negentropy Increment index

Description

Calculate the Negentropy Increment index of clustering quality.

Usage

calcNegentropyI(data, belongmatrix, centers)

Arguments

data

The original dataframe used for the clustering (n*p)

belongmatrix

A membership matrix (n*k)

centers

The centres of the clusters

Details

The Negentropy Increment index \insertCiteda2020incrementalgeocmeans is based on the assumption that a normally shaped cluster is more desirable. It uses the difference between the average negentropy of all the clusters in the partition, and that of the whole partition. A smaller value indicates a better partition. The formula is:

NI=\frac{1}{2} ∑_{j=1}^{k} p_{i} \ln ≤ft|{\boldsymbol{Σ}}_{j}\right|-\frac{1}{2} \ln ≤ft|\boldsymbol{Σ}_{d a t a}\right|-∑_{j=1}^{k} p_{j} \ln p_{j}

with a cluster, |.| the determinant of a matrix,

  • j a cluster

  • |.| the determinant of a matrix

  • ≤ft|{\boldsymbol{Σ}}_{j}\right| the covariance matrix of the dataset weighted by the membership values to cluster j

  • ≤ft|\boldsymbol{Σ}_{d a t a}\right| the covariance matrix of the dataset

  • p_{j} the sum of the membership values to cluster j divided by the number of observations.

Value

A float: the Negentropy Increment index

References

\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)
calcNegentropyI(result$Data, result$Belongings, result$Centers)

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