apd: Average Partition Density

View source: R/apd.R

apdR Documentation

Average Partition Density

Description

Computes the Average Partition Density (Gath & Geva, 1989) value for validating the result of a fuzzy cluster analysis.

Usage

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

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.

Details

Average Partition Density proposed by (Gath & Geva, 1989) is calculated as follows:

I_{APD}=\frac{1}{k}∑\limits_{j=1}^k \frac{R_j}{√{|\mathbf{F_j}|}}

Where: \mathbf{F_j} is the fuzzy covariance matrix of j-th cluster:

\mathbf{F_j} = \frac{∑\limits_{i=1}^n u_{ij} (\vec{x_i}-\vec{v_j})^T(\vec{x_i}-\vec{v_j})}{∑\limits_{i=1}^n u_{ij}}

R_j is the sum of central members:

R_j=∑\limits_j u_{ij}

Since compact fuzzy clusters provide small values of √{|\mathbf{F_j}|} and large values of R_j, good fuzzy partitions are obtained by large values of I_{APD}.

Value

apd

APD value if tidx is ‘f’

apd.e

extended APD value if tidx is ‘e’

apd.g

generalized APD value if tidx is ‘g’

Author(s)

Zeynel Cebeci

References

Gath, I. & Geva, A. B. (1989). Unsupervised optimal fuzzy clustering. IEEE Transactions on Pattern Analysis and Machine Intelligence, 11(7):773-780. <doi:10.1109/34.192473>

See Also

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

Examples

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

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

# Compute the APD using ppclust object
idx <- apd(res.fcm)
print(idx)
 
# Compute the APD using X,U and V matrices
idx <- apd(res.fcm$x, res.fcm$u, res.fcm$v, m=2)
print(idx)

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