STRPBM.IDX {UniversalCVI} | R Documentation |
Starczewski and Pakhira-Bandyopadhyay-Maulik for crisp clustering indexes
Description
Computes the STR (A. Starczewski, 2017) and PBM (M. K. Pakhira et al., 2004) indexes for a result either kmeans or hierarchical clustering from user specified kmin
to kmax
.
Usage
STRPBM.IDX(x, kmax, kmin = 2, method = "kmeans", indexlist = "all", nstart = 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. |
kmax |
a maximum number of clusters to be considered. |
kmin |
a minimum number of clusters to be considered. The default is |
method |
a character string indicating which clustering method to be used ( |
indexlist |
a character string indicating which cluster validity indexes to be computed ( |
nstart |
a maximum number of initial random sets for kmeans for |
Details
PBM index can be used with both crisp and fuzzy clustering algorithms.
The largest value of STR(k)
indicates a valid optimal partition.
The largest value of PBM(k)
indicates a valid optimal partition.
Value
STR |
the STR index for |
PBM |
the PBM index for |
Author(s)
Nathakhun Wiroonsri and Onthada Preedasawakul
References
M. K. Pakhira, S. Bandyopadhyay and U. Maulik, "Validity index for crisp and fuzzy clusters," Pattern Recogn 37(3):487–501 (2004).
A. Starczewski, "A new validity index for crisp clusters," Pattern Anal Applic 20, 687–700 (2017).
See Also
Wvalid, FzzyCVIs, DI.IDX, R1_data
Examples
library(UniversalCVI)
# The data is from Wiroonsri (2024).
x = R1_data[,1:2]
# ---- Kmeans ----
# Compute all the indices by STRPBM.IDX
K.ALL = STRPBM.IDX(scale(x), kmax = 15, kmin = 2, method = "kmeans",
indexlist = "all", nstart = 100)
print(K.ALL)
# Compute STR index
K.STR = STRPBM.IDX(scale(x), kmax = 15, kmin = 2, method = "kmeans",
indexlist = "STR", nstart = 100)
print(K.STR)
# ---- Hierarchical ----
# Average linkage
# Compute all the indices by STRPBM.IDX
H.ALL = STRPBM.IDX(scale(x), kmax = 15, kmin = 2, method = "hclust_average",
indexlist = "all")
print(H.ALL)
# Compute STR index
H.STR = STRPBM.IDX(scale(x), kmax = 15, kmin = 2, method = "hclust_average",
indexlist = "STR")
print(H.STR)