With the initialseedtable argument, the cluster centers and assignments are the same every time, with the same distance metric (in this case, the default, Euclidean).
KModes Example 1 Output Table
summary |
between_cluster_error |
total_within_cluster_error |
pseudo_f |
Number of Clusters: 3 |
195.82116758156 |
113.178832431262 |
16.7251942136624 |
Number of Iterations: 5 |
|
|
|
Model Converged: true |
|
|
|
Number of Data Points: 32.0 |
|
|
|
The model table kmodes_clusters is generated.
The following query returns the output shown in the table kmodes_clusters:
SELECT * FROM kmodes_clusters ORDER BY 1;
KModes Example 1 Output Table kmodes_clusters (Columns 1-5)
cluster_id |
mpg |
disp |
hp |
drat |
0 |
-0.724943435928571 |
0.890010157642857 |
0.511912862714286 |
-0.9434069635 |
1 |
-0.2639188168 |
-0.059076587 |
0.760068841 |
0.4478156392 |
2 |
0.882215552923077 |
-0.935750713230769 |
-0.843624945153846 |
0.843739945692308 |
KModes Example 1 Output Table kmodes_clusters (Columns 6-12)
wt |
qsec |
cyl |
vs |
am |
gear |
carb |
0.794435602785714 |
-0.180375863 |
8 |
S |
automatic |
3 |
4 |
-0.221011145 |
-1.2494800924 |
6 |
S |
manual |
5 |
4 |
-0.770541747153846 |
0.674820195846154 |
4 |
V |
manual |
4 |
2 |
KModes Example 1 Output Table kmodes_clusters (Columns 13-16)
within_cluster_ss |
cluster_weight |
distance_metric |
category_weights |
43.6174097337196 |
14 |
EUCLIDEAN,OVERLAP |
[1.0,1.0,1.0,1.0,1.0] |
20.7870494221671 |
5 |
|
|
48.7743732753756 |
13 |
|
|