Hi,
Just started looking at this library as I am in need of a K-means clustering algorithm.
I understand the algorithm i'm not sure on how to use the libarary for it. I have copied the code from the example to get a grasp on how it works, my question is where is the return stored form the clustering? Should it return an [[,]] containing the vectors within the 2 classifications? (from this code below). I'm using C# by the way.
Many thanks in advance.
alglib.clusterizerstate s; alglib.kmeansreport rep; double[,] xy = new double[,] { { 1, 1, 4 }, { 1, 2, 3 }, { 4, 1, 6 }, { 2, 3, 8 }, { 4, 1.5, 3 }}; alglib.clusterizercreate(out s); alglib.clusterizersetpoints(s, xy, 2); alglib.clusterizersetkmeanslimits(s, 4, 0); alglib.clusterizerrunkmeans(s, 2, out rep);
now I would like to get at the clusters, just print them out to begin.
|