forum.alglib.net

ALGLIB forum
It is currently Sun Nov 10, 2024 7:42 pm

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: getting started with the library. K-means clustering C#
PostPosted: Sat Jan 17, 2015 12:12 am 
Offline

Joined: Sat Jan 17, 2015 12:02 am
Posts: 1
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group