ac.essex.ooechs.kmeans
Class KMeansSolution

java.lang.Object
  extended by ac.essex.ooechs.kmeans.KMeansSolution

public class KMeansSolution
extends java.lang.Object

A utility class that allows the output of the K means clusterer to be tested on training or unseen data.


Field Summary
protected  java.util.Vector<Centroid> centroids
          The centroids that were discovered after the K means clustering algorithm was run
 
Constructor Summary
KMeansSolution(java.util.Vector<Centroid> centroids)
          Initialises the solution, giving it the list of centroids that were discovered after the K means clustering algorithm was run
 
Method Summary
 ClusterClass test(DataPoint obj)
          Returns the likely class of an object based on its position in n dimensional space.
 ClusterClass test(double[] values)
          Returns the likely class of an object based on its position in n dimensional space.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

centroids

protected java.util.Vector<Centroid> centroids
The centroids that were discovered after the K means clustering algorithm was run

Constructor Detail

KMeansSolution

public KMeansSolution(java.util.Vector<Centroid> centroids)
Initialises the solution, giving it the list of centroids that were discovered after the K means clustering algorithm was run

Method Detail

test

public ClusterClass test(DataPoint obj)
Returns the likely class of an object based on its position in n dimensional space.


test

public ClusterClass test(double[] values)
Returns the likely class of an object based on its position in n dimensional space.