The easiest way to use this is by using the =GetKMeansCluster() formula in a table.
Points
x
y
z
Cluster
Cluster from generated
x
y
z
Cluster
Cluster from generated
1
22
22
16
d
d
2
11
4
18
e
c
3
10
9
19
e
c
4
2
25
23
c
a
5
12
10
20
b
c
6
20
19
4
e
e
7
24
4
2
d
b
8
17
6
11
e
b
9
3
12
9
d
e
10
18
25
10
c
d
There are no rows in this table
For something that will probably calculate quicker, you can use =GenerateAllClusters() and then add those in order with a column formula like =Clusters.Nth(Points.Find(thisRow))
d
c
c
a
c
e
b
b
e
d
Note that the name of the clusters will differ based on randomness even with the same inputs, but the centroids should be aboutthe same.
I also wrapped clustering of 1 to provide a centroid formula. The centroid of the points above is: (
13.913.613.2
)
Want to print your doc? This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (