pc | R Documentation |
Computes the Partition Coefficient (Bezdek, 1974) in order to validate the result of a fuzzy and/or possibilistic clustering analysis.
pc(u, m, t=NULL, eta, tidx="f")
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 |
m |
a number specifying the fuzzy exponent. It should be specified if |
eta |
a number specifying the typicality exponent. It should be specified if |
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. |
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}.
pc |
PC index if |
pc.e |
extended PC index if |
pc.g |
generalized PC index if |
Zeynel Cebeci
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>
allindexes
,
apd
,
cl
,
cs
,
cwb
,
fhv
,
fs
,
kpbm
,
kwon
,
mcd
,
mpc
,
pbm
,
pe
,
sc
,
si
,
tss
,
ws
,
xb
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.