forum.alglib.net http://forum.alglib.net/ |
|
getting started with the library. K-means clustering C# http://forum.alglib.net/viewtopic.php?f=2&t=2225 |
Page 1 of 1 |
Author: | rxm113 [ Sat Jan 17, 2015 12:12 am ] |
Post subject: | getting started with the library. K-means clustering C# |
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. |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |