Skip to content

Algorithms for computing cluster validity indices including the WP index and plots for comparing and visualizing them.

License

Notifications You must be signed in to change notification settings

nwiroonsri/WPfuzzyCVIs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WPfuzzyCVIs

Algorithms for computing cluster validity indices including the WP index and plots for comparing and visualizing them.

Description

WPfuzzyCVIs is a package used for analyzing soft or probabilistic clustering results including fuzzy c-means (FCM) and EM algorithm. It contains the main algorithm FzzyCVIs that computes all the indices listed below from the user specified cmin to cmax. It also includes WP.IDX that computes WP correlation (WPC), WP, WPCI1 and WPCI2 from the recent work (Wiroonsri and Preedasawakul, 2023). The version compatible with hard clustering results including Kmeans and hierachical clustering can be found in https://github.com/nwiroonsri/NCvalid.

The package includes the following algorithms.

  1. FzzyCVIs: for computing all or part of the indices below.
  2. WP.IDX: Wiroonsri and Preedasawakul (WP) index.
  3. XB.IDX: Xie and Beni (XB) index.
  4. KWON.IDX: KWON index
  5. KWON2.IDX: KWON2 index
  6. TANG.IDX: Tang index.
  7. HF.IDX: HF index.
  8. WL.IDX: Wu and Li (WL) index.
  9. PBM.IDX: Pakhira-Bandyopadhyay-Maulik (PBM) index.
  10. KPBM.IDX: Modified Kernel form of Pakhira-Bandyopadhyay-Maulik (KPBM) index.
  11. CCV.IDX: Correlation Cluster Validity (CCV) index.
  12. GC.IDX: The generalized C index.
  13. AccClust: for computing an accuracy for a clustering result with known classes.
  14. plot.idx: for ploting and comparing upto 8 indices computed from the algorithms 1 to 12.

The package also includes 17 simulated datasets from FuzzyDatasets

Installation

install.packages("devtools")
devtools::install_github("nwiroonsri/WPfuzzyCVIs")

Example

Using WP.IDX to compute the WP index for a clustering result from 2 to 10

library(WPfuzzyCVI)

x = iris[,1:4]

# Computes all indexes of a FCM clustering result for c from 2 to 10
FCM.WP = WP.IDX(scale(x), cmax = 10, cmin = 2, corr = 'pearson', method = 'FCM', fzm = 2,
                iter = 100, nstart = 20, NCstart = TRUE)
#---Plot and compare the indexes---
plot.idx(idx.result=FCM.WP )

Plot

Example

Using FzzyCVIs to compute all the indices in the package for a clustering result from 2 to 15

library(FuzzyDatasets)
library(WPfuzzyCVI)
# The data is from the FuzzyDatasets package (https://github.com/O-PREEDASAWAKUL/FuzzyDatasets). 
x = R1_data[,1:2]

# Computes all indexes of a FCM clustering result for c from 2 to 15
FCVIs.all = FzzyCVIs(scale(x), cmax = 15, cmin = 2, indexlist = 'all', corr = 'pearson',
         method = 'FCM', fzm = 2, iter = 100, nstart = 20, NCstart = TRUE)
#---Plot and compare the indexes---
plot.idx(idx.result=FCVIs.all)

Plot

Using FzzyCVIs to compute 6 selected indices for a clustering result from 2 to 15 with the fuzziness parameter gamma = 7

# Computes 6 indices for a FCM clustering result for c from 2 to 15
IDX.list = c("WP", "PBM", "TANG", "XB", "GC2", "KWON2")
FCVIs = FzzyCVIs(scale(x), cmax = 15, cmin = 2, indexlist = "all", corr = 'pearson',
                 method = 'FCM', fzm = 2, gamma = 7, iter = 100, nstart = 20, NCstart = TRUE)
#---Plot and compare the indexes---
plot.idx(idx.result=FCVIs)

Plot

References

  1. N. Wiroonsri and O. Preedasawakul, “A correlation-based fuzzy cluster validity index with secondary options detector”, arXiv:2308.14785, 2023. https://arxiv.org/abs/2308.14785

  2. X. Xie and G. Beni, “A validity measure for fuzzy clustering,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 13, no. 8, pp. 841–847, 1991.

  3. S. H. Kwon, “Cluster validity index for fuzzy clustering,” Electronics letters, vol. 34, no. 22, pp. 2176–2177, 1998. \cr\cr

  4. M. K. Pakhira, S. Bandyopadhyay, and U. Maulik, “Validity index for crisp and fuzzy clusters,” Pattern recognition, vol. 37, no. 3, pp. 487–501, 2004.

  5. Y. Tang, F. Sun, and Z. Sun, “Improved validation index for fuzzy clustering,” in Proceedings of the 2005, American Control Conference, 2005., pp. 1120–1125 vol. 2, 2005.

  6. C. Alok. (2010). An investigation of clustering algorithms and soft computing approaches for pattern recognition, Department of Computer Science, Assam University.

  7. M. Popescu, J. C. Bezdek, T. C. Havens and J. M. Keller, "A Cluster Validity Framework Based on Induced Partition Dissimilarity," in IEEE Transactions on Cybernetics, vol. 43, no. 1, pp. 308-320, Feb. 2013.

  8. 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.

  9. J. C. Bezdek, M. Moshtaghi, T. Runkler, and C. Leckie, “The generalized c index for internal fuzzy cluster validity,” IEEE Transactions on Fuzzy Systems, vol. 24, no. 6, pp. 1500–1512, 2016.

  10. F. Haouas, Z. Ben Dhiaf, A. Hammouda and B. Solaiman, "A new efficient fuzzy cluster validity index: Application to images clustering," 2017 IEEE International Conference on Fuzzy Systems (FUZZ-IEEE), Naples, Italy, 2017, pp. 1-6.

  11. S. H. Kwon, J. Kim, and S. H. Son, “Improved cluster validity index for fuzzy clustering,” Electronics Letters, vol. 57, no. 21, pp. 792–794, 2021.

License

The WPfuzzyCVIs package as a whole is distributed under GPL(>=3).

About

Algorithms for computing cluster validity indices including the WP index and plots for comparing and visualizing them.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages