ws: Weighted Summation Index

View source: R/ws.R

wsR Documentation

Weighted Summation Index

Description

Computes the Weighted Summation (Zhou et al, 2014) index in order to validate the result of a fuzzy and/or possibilistic cluster analysis.

Usage

ws(x, u, v, m, t=NULL, eta, tidx="f", w)

Arguments

x

an object of class ‘ppclust’ containing the clustering results from a fuzzy clustering algorithm in the package ppclust. Alternatively, a numeric data frame or matrix containing the data set.

u

a numeric data frame or matrix containing the fuzzy membership values. It should be specified if x is not an object of ‘ppclust’.

v

a numeric data frame or matrix containing the cluster prototypes. It should be specified if x is not an object of ‘ppclust’.

t

a numeric data frame or matrix containing the cluster prototypes. It should be specified if x is not an object of ‘ppclust’ and the option e or g is assigned to tidx.

m

a number specifying the fuzzy exponent. It should be specified if x is not an object of ‘ppclust’.

eta

a number specifying the typicality exponent. It should be specified if x is not an object of ‘ppclust’ and tidx is either e or g.

tidx

a character specifying the type of index. The default is ‘f’ for fuzzy index. The other options are ‘e’ for extended and ‘g’ for generalized index.

w

a numeric vector specifying the weights of individiual indexes included in summation. As default the value of w is 1/k. Zero is assigned to the position of the index in w is not desired to include into WS. The order of the indexes in the w is 1:pc, 2:mpc, 3:pbm, 4:kpbm, 5:cl, 6:si, 7:pe, 8:xb, 9:fs, 10:ts, 11:kwon, 12:fhv, 13:cwb, 14:apd. The sum of the weights in the w must be 1. For example, in case of w=c(0.025, 0.025, 0.025, 0.1, 0.1, 0.025, 0.1, 0.2, 0.2, 0.0, 0.0, 0.1, 0.05, 0.05) the weights of fhvs and cwb are 0 that mean these indexes are not included while xb and fs more important than the others.

Details

In order to take advantage of each fuzzy cluster validity indexes and weaken their limitations, (Zhou et al, 2014) proposed a weighted summation type of indexes, which is the weighted sum of the fuzzy indexes. They argued that the proposed Weighted Summation (WS) is more effective in finding the optimal cluster numbers than single index when the weights of each index included in the calculation of WS. The proposed index has been defined as follows:

I_{WS}=∑\limits_{i=1}^N ω_i I_i

Where: ω_i is the weight representing the relative importance of the ith index, and satisfies:

0 ≤q ω_i ≤q 1\; , ∑\limits_{i=1}^N ω_i = 1

Where, I_i is one of the indexes of the package ‘fcvalid’ for fuzzy and/or possibilistic clustering. N stands for the number indexes used in summation formula of WS. Among the indexes, PC, MPC and PBM are maximum type indexes, i.e., the optimal cluster number k^* is obtained at the maximum value of these indexes, while other indexes are minimum type. In order to obtain k^* when WS is minimum, so the three maximum type indexes are converted into their corresponding reciprocal type indexes, which are presented as PC_r = 1/PC, MPC_r = 1/MPC, PBM_r = 1/PBM. The values of different indexes change in different range. To overcome the dominate influence of indexes in large values, all the indexes are normalized so that all of their values range in [0, 1]. The corresponding cluster number is optimal cluster number k^* when the values of the normalized indexes equal to 0, and the minimum value of I_{WS} is achieved (Zhou et al, 2014).

Value

ws

WS index value if tidx is ‘f’

ws.e

extended WS index value if tidx is ‘e’

ws.g

generalized WS index value if tidx is ‘g’

Author(s)

Zeynel Cebeci

References

Zhou, K.L., Ding, S., Fu, C. & Yang, S.L. (2014). Comparison and weighted summation type of fuzzy cluster validity indices. Int. J. Comput. Commun., 9(3):370-378. <http://univagora.ro/jour/index.php/ijccc/article/viewFile/237/pdf_126>

See Also

allindexes, apd, cl, cs, cwb, fhv, fs, kpbm, kwon, mcd, mpc, pbm, pc, pe, sc, si, tss, xb

Examples

# Load the dataset iris and use the first four feature columns 
data(iris)
x <- iris[,1:4]

# Run FCM algorithm in the package ppclust 
res.fcm <- ppclust::fcm(x, centers=3)

# Compute the WS index using res.fcm, which is a ppclust object
idx <- ws(res.fcm)
print(idx)
 
# Run UPFC algorithm in the package ppclust 
res.upfc <- ppclust::upfc(x, centers=3)
# Compute the generalized WS index using res.upfc, which is a ppclust object
idx <- ws(res.upfc, tidx="g")
print(idx)

zcebeci/fcvalid documentation built on Oct. 4, 2022, 9:01 p.m.