AccClust {UniversalCVI} | R Documentation |
Accuracy detection for a clustering result with known classes
Description
Computes the accuracy of a clustering result of a dataset with known classes from the k-means, fuzzy c-means, or EM algorithm.
Usage
AccClust(x, label.names = "label", algorithm = "FCM", fzm = 2,
scale = TRUE, nstart = 100, iter = 100)
Arguments
x |
a numeric data frame or matrix where each column is a variable to be used for cluster analysis and each row is a data point. |
label.names |
a character string indicating the true label column name. The default is |
algorithm |
a character string indicating which clustering methods to be used ( |
fzm |
a number greater than 1 giving the degree of fuzzification for |
scale |
logical, if |
nstart |
a maximum number of initial random sets for FCM for |
iter |
a maximum number of iterations for |
Value
kmeans |
Accuracy score from |
FCM |
Accuracy score from |
EM |
Accuracy score from |
Author(s)
Nathakhun Wiroonsri and Onthada Preedasawakul
References
N. Wiroonsri, O. Preedasawakul, A correlation-based fuzzy cluster validity index with secondary options detector, arXiv:2308.14785, 2023
See Also
R1_data, D1_data, FzzyCVIs, WP.IDX, XB.IDX, Hvalid
Examples
library(UniversalCVI)
# The data is from Wiroonsri (2024).
x = R1_data
# Check accuracy of clustering results obtained by kmeans, FCM, and EM clustering
AccClust(x, label.names = "label",algorithm = c("Kmeans","FCM","EM"), fzm = 2,
scale = TRUE, nstart = 20,iter = 100)
# Check accuracy of a clustering result obtained by the FCM algoritm
AccClust(x, label.names = "label",algorithm = "FCM", fzm = 2,
scale = TRUE, nstart = 20,iter = 100)