Just for completeness, @ niczky12's answer in Julia has a package called Clustering , which, according to this name, allows clustering.
Example kmeans algorithm:
>>> using Clustering # Pkg.add("Clustering") if not installed >>> X = rand(3, 100) # data, each column is a sample >>> k = 10 # number of clusters >>> r = kmeans(X, k) >>> fieldnames(r) 8-element Array{Symbol,1}: :centers :assignments :costs :counts :cweights :totalcost :iterations :converged
The result is stored in the return kmeans ( r ), which contains the above fields. Two perhaps the most interesting fields: r.centers contains the centers detected by the kmeans algorithm, and r.assigments contains the cluster to which each of the 100 samples belongs.
There are several other clustering methods in one package. Feel free to dive into the documentation and apply the one that best suits your needs.
In your case, since your data is an N x 3 matrix, you only need to transpose it:
M = rand(100, 3) kmeans(M', k)
source share