@Teep, @Carl Love: As Carl mentions, there are plenty of different algorithms for cluster analysis. If memory serves, Carl's code is for fuzzy c-means clustering and I have unfortunately not found the time to incorporate that into the package that I worked on for cluster analysis yet.
Here's the link to Carl's MaplePrimes post on c-means clustering from a few years ago: https://www.mapleprimes.com/questions/211184-Fuzzy-Cmeans-Clustering
The package that I worked on and added to the MapleCloud is for k-means clustering. You can download the package here: https://maple.cloud/app/5629844458045440/ClusterAnalysis (or via the MapleCloud in Maple). If you are using an older version of Maple that doesn't have the package cloud, then you can grab the mla and help files from my Github repository for the package. There are some nice additional commands in the package too for plotting the results of cluster analysis and the beginnings for other commands on confusion tables and matrices.
I would echo what Carl suggests, start with the Wikipedia pages on these topics. If you have any questions about the differences between the two algorithms I mention above, please feel free to ask.