WL.IDX {UniversalCVI} | R Documentation |
Wu and Li (WL) index
Description
Computes the WL (C. H. Wu et al., 2015) index for a result of either FCM or EM clustering from user specified cmin
to cmax
.
Usage
WL.IDX(x, cmax, cmin = 2, method = "FCM", fzm = 2, nstart = 20, iter = 100)
Arguments
x |
a numeric data frame or matrix where each column is a variable to be used for cluster analysis and each row is a data point. |
cmax |
a maximum number of clusters to be considered. |
cmin |
a minimum number of clusters to be considered. The default is |
method |
a character string indicating which clustering method to be used ( |
fzm |
a number greater than 1 giving the degree of fuzzification for |
nstart |
a maximum number of initial random sets for FCM for |
iter |
a maximum number of iterations for |
Details
The WL index is defined as
WL(c) = \frac{\sum_{j=1}^c\left(\frac{\sum_{i=1}^n\mu_{ij}^2\| {x}_i-{v}_j\|^2}{\sum_{i=1}^n\mu_{ij}}\right)}{min_{j \neq k}\{\| {v}_j-{v}_k\|^2\} +median_{j \neq k }\{\| {v}_j-{v}_k\|^2\}}.
The smallest value of WL(c)
indicates a valid optimal partition.
Value
WL |
the WL index for |
Author(s)
Nathakhun Wiroonsri and Onthada Preedasawakul
References
C. H. Wu, C. S. Ouyang, L. W. Chen, and L. W. Lu, “A new fuzzy clustering validity index with a median factor for centroid-based clustering,” IEEE Transactions on Fuzzy Systems, vol. 23, no. 3, pp. 701–718, 2015.https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=6811211&isnumber=7115244
See Also
R1_data, TANG.IDX, FzzyCVIs, WP.IDX, Hvalid
Examples
library(UniversalCVI)
# The data is from Wiroonsri (2024).
x = R1_data[,1:2]
# ---- FCM algorithm ----
# Compute the WL index
FCM.WL = WL.IDX(scale(x), cmax = 15, cmin = 2, method = "FCM",
fzm = 2, nstart = 20, iter = 100)
print(FCM.WL)
# The optimal number of cluster
FCM.WL[which.min(FCM.WL$WL),]
# ---- EM algorithm ----
# Compute the WL index
EM.WL = WL.IDX(scale(x), cmax = 15, cmin = 2, method = "EM",
nstart = 20, iter = 100)
print(EM.WL)
# The optimal number of cluster
EM.WL[which.min(EM.WL$WL),]