
rigorously enforce the prescribed cluster sizes, there
is variability in clustering quality across datasets. In
several cases, CSCLP exhibits higher external valida-
tion scores (with values closer to 1), suggesting better
alignment with the ground truth partitioning. Con-
versely, for a few datasets, K-MedoidsSC attains com-
petitive or even superior internal cohesion as reflected
in the silhouette coefficient.
Table 3: External and internal clustering validation indices
for OpenML datasets (column ID, see Table1). External in-
dices (ARI, AMI, and NMI) and the Silhouette Coefficient
S(i) are reported for four different clustering algorithms.
Best results in bold.
ID Algorithm #Groups
Cluster Sizes
ARI AMI NMI S(i)
1 2 3 4 5 6 7 8 9
1
AHC 3 50 74 26 0.644 0.714 0.717 0.601
K-Medoids 3 50 62 38 0.730 0.748 0.751 0.540
CSCLP 3 50 50 50 0.813 0.769 0.772 0.631
K-MedoidsSC 3 50 50 50 0.015 0.013 0.025 -0.076
2
AHC 2 801 224 0.028 0.025 0.026 0.509
K-Medoids 2 501 524 0.020 0.014 0.015 0.462
CSCLP 2 499 526 0.149 0.110 0.111 0.325
K-MedoidsSC 2 499 526 0.024 0.018 0.019 0.107
3
AHC 7 1145 301 248 40 366 2 9 0.067 0.146 0.149 0.479
K-Medoids 7 343 332 440 317 179 340160 0.312 0.470 0.472 -0.035
CSCLP 7 272 287 351 297 324 290290 0.133 0.238 0.242 0.269
K-MedoidsSC 7 272 287 351 297 324 290290 0.085 0.134 0.138 -0.206
4
AHC 6 151 25 6 27 3 2 0.285 0.353 0.378 0.718
K-Medoids 6 39 65 60 20 28 2 0.199 0.305 0.332 0.279
CSCLP 6 70 76 17 13 9 29 0.206 0.270 0.302 0.196
K-MedoidsSC 6 70 76 17 13 9 29 0.080 0.135 0.172 -0.147
5
AHC 2 44 524 0.126 0.123 0.124 0.689
K-Medoids 2 139 429 0.533 0.458 0.459 0.556
CSCLP 2 356 212 0.609 0.484 0.484 0.619
K-MedoidsSC 2 356 212 0.066 0.034 0.035 0.230
6
AHC 2 2938 60 -0.029 0.005 0.006 0.869
K-Medoids 2 1664 1334 -0.009 0.026 0.027 0.275
CSCLP 2 226 2772 0.179 0.052 0.053 -0.345
K-MedoidsSC 2 226 2772 -0.036 0.004 0.004 -0.559
7
AHC 2 3274 2 1.23e-04 -2.87e-04 2.26e-05 0.998
K-Medoids 2 1826 1450 0.001 1.25e-04 3.47e-04 0.057
CSCLP 2 1998 1278 0.004 0.001 0.001 -0.022
K-MedoidsSC 2 1998 1278 0.004 6.30e-04 8.58e-04 0.291
8
AHC 2 1868 470 0.023 0.028 0.028 0.072
K-Medoids 2 970 1368 0.004 0.003 0.003 0.075
CSCLP 2 1177 1161 0.049 0.036 0.036 0.187
K-MedoidsSC 2 1177 1161 0.010 0.007 0.008 0.049
9
AHC 2 1952 187 0.083 0.018 0.018 0.479
K-Medoids 2 1433 706 0.044 0.011 0.011 0.513
CSCLP 2 1618 521 -0.067 0.065 0.065 0.210
K-MedoidsSC 2 1618 521 0.097 0.029 0.029 0.285
10
AHC 6 2032 90 110 78 93 40 0.002 0.003 0.007 0.842
K-Medoids 6 48 738 316 1231 11 99 -0.012 0.018 0.022 -0.594
CSCLP 6 330 593 392 93 162 873 0.022 0.033 0.036 -0.067
K-MedoidsSC 6 330 593 392 93 162 873 1.22e-04 0.016 0.020 -0.275
11
AHC 2 4756 244 0.172 0.045 0.045 0.822
K-Medoids 2 2448 2552 -9.59e-05 -1.43e-04 1.35e-06 0.002
CSCLP 2 4520 480 0.294 0.121 0.121 -0.024
K-MedoidsSC 2 4520 480 0.161 0.043 0.044 0.815
12
AHC 2 5743 754 0.445 0.303 0.303 0.846
K-Medoids 2 4175 2322 0.472 0.355 0.355 0.473
CSCLP 2 1599 4898 -0.070 0.116 0.116 -0.156
K-MedoidsSC 2 1599 4898 -0.066 0.068 0.068 -0.216
13
AHC 9 30 7 5 11 42 16 14 4288 22 0.012 0.029 0.033 0.931
K-Medoids 9 567 658 647 615 379 394522 371 282 0.361 0.525 0.527 -0.056
CSCLP 9 1399 312 467 356 290549 503 185 374 0.418 0.438 0.440 0.041
K-MedoidsSC 9 1399 312 467 356 290549 503 185 374 0.095 0.161 0.164 -0.201
14
AHC 3 4242 528 1050 -0.032 0.005 0.005 0.607
K-Medoids 3 2201 25271092 -0.004 0.008 0.009 0.124
CSCLP 3 775 14443601 -0.014 0.002 0.002 0.477
K-MedoidsSC 3 775 14443601 0.041 0.017 0.017 -0.353
15
AHC 3 3087 1088 2 0.125 0.114 0.114 0.775
K-Medoids 3 1373 14991305 0.153 0.164 0.164 0.501
CSCLP 3 1307 13421528 0.166 0.168 0.169 0.522
K-MedoidsSC 3 1307 13421528 0.037 0.034 0.034 -0.095
5.2 Performance Analysis
A series of experiments were performed to com-
pare the computational efficiency of SC-Medoids and
CSCLP across the datasets in Table 1. Using both Co-
sine and Euclidean distance metrics, execution times
and peak RAM consumption were recorded (see Ta-
ble 4). In general, SC-Medoids consistently out-
performed CSCLP, particularly for medium to large
datasets. For example, while SC-Medoids processed
certain datasets in under a second, CSCLP required
several orders of magnitude more time for equivalent
tasks and, in some cases, exceeded the 1GB RAM
threshold imposed by the hosting platform. This dis-
parity underscores the suitability of SC-Medoids for
resource-limited, interactive web applications.
Table 4: Comparison of execution times and peak RAM be-
tween K-MedoidsSC and CSCLP algorithms. The “–” sym-
bol indicates tests that could not be completed due to re-
source constraints or data issues.
ID Distance Time [s] RAM Peak [MB]
K-MedoidsSC CSCLP K-MedoidsSC CSCLP
1
Cosine 0.023 0.011 233.2 239.4
Euclidean 0.028 0.018 235.4 244.5
2
Cosine 0.055 0.492 256.6 272.6
Euclidean 0.256 0.719 256.6 364.4
3
Cosine 0.642 2.04 365.8 1022.1
Euclidean 0.438 1.624 954.4 1030.9
4
Cosine 0.026 0.046 758.1 767.8
Euclidean 0.003 0.307 759.7 760.1
5
Cosine 0.049 0.077 761.1 761.5
Euclidean 0.048 0.120 774.2 762.1
6
Cosine 1.398 2.366 652.4 2084.5
Euclidean 1.425 2.386 588.4 2079.8
7
Cosine 0.644 – 535.3 –
Euclidean 0.863 – 674.6 –
8
Cosine 0.317 1.281 374.8 1126.6
Euclidean 0.320 1.220 877.3 1105.2
9
Cosine 0.350 0.945 657.2 1042.7
Euclidean 0.292 0.984 690.7 1068.8
10
Cosine 0.315 4431 914.3 1187.2
Euclidean 0.326 4606 914.5 1187.3
11
Cosine 1604 6056 1053.6 2521.8
Euclidean 1.220 6249 1044.9 2513.9
12
Cosine 2988 – 3083.1 –
Euclidean 2152 – 1857.5 –
13
Cosine 1254 32319 2048.2 2935.7
Euclidean 0.976 36437 1118.8 2932.0
14
Cosine 3.330 16729 3257.9 5688.0
Euclidean 2.956 15091 1960.6 5777.4
15
Cosine 0.851 6695 4111.9 6911.5
Euclidean 0.821 6391 4112.8 6913.3
5.3 System Load Testing
Load testing is essential to ensure that the sys-
tem works optimally under actual conditions of use
with several users connected simultaneously (Dra-
heim et al., 2006). By simulating different load sce-
narios, such as user peaks or increases in data volume,
we can identify how our system responds and where
performance problems could arise.
Using Apache JMeter, we simulated various lev-
els of concurrent user activity. Three controlled sce-
narios were configured, with 30, 50, and 70 threads
(each representing a simultaneous user) launched
with a ramp-up time of 0 seconds to generate an in-
stantaneous peak load. In each scenario, every thread
executed a single iteration—submitting a clustering
ClustSize: An Algorithmic Framework for Size-Constrained Clustering
487