pc: Partition Coefficient

View source: R/pc.R

pcR Documentation

Partition Coefficient

Description

Computes the Partition Coefficient (Bezdek, 1974) in order to validate the result of a fuzzy and/or possibilistic clustering analysis.

Usage

pc(u, m, t=NULL, eta, tidx="f")

Arguments

u

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 fuzzy membership degrees.

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.

Details

Partition Coefficient (Bezdek, 1974) is one of the earliest proposed fuzzy validity indexes. It uses only the membership degrees matrix associated with fuzzy c-partitions of a data set. The formula of PC is:

I_{PC}=\frac{1}{n} ∑\limits_{i=1}^n ∑\limits_{j=1}^k u_{ij}^m

The value of I_{PC} varies between 1/k and 1 (1/k ≤q I_{PC} ≤q 1) (Halkidi et al, 2002b). While it is close to 1/k the clustering is complelety fuzzy, and in this case, each object belongs to all clusters with the same degree of membership. This means that there is no clustering tendency in the considered dataset or the used clustering algorithm failed to reveal the clustering. On the other hand, if it equals to 1 the clustering becomes fully crisp. In this case, the membership values are either 0 or 1. The optimal clustering is found at the maximum value of I_{PC}.

Value

pc

PC index if tidx is ‘f’

pc.e

extended PC index if tidx is ‘e’

pc.g

generalized PC index if tidx is ‘g’

Author(s)

Zeynel Cebeci

References

Bezdek, J.C. (1974). Cluster validity with fuzzy sets. J Cybernetics, 3(3):58-72. <doi:10.1080/01969727308546047>

Halkidi, M., Batistakis, Y., & Vazirgiannis, M. (2002b). Clustering validity checking methods: part II. ACM Sigmod Record, 31(3):19-27. <doi:10.1145/601858.601862>

See Also

allindexes, apd, cl, cs, cwb, fhv, fs, kpbm, kwon, mcd, mpc, pbm, pe, sc, si, tss, ws, 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 PC index using res.fcm, which is a ppclust object
idx <- pc(res.fcm)
print(idx)
 
# Compute the PC index using U matrix
idx <- pc(res.fcm$u)
print(idx)

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

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