anl.aida.algo
Interface Cluster<T>

All Known Implementing Classes:
SimilarityCluster

public interface Cluster<T>

Interface for a Cluster as produced from a Clustering algorithm. The cluster should contain items of type T.


Method Summary
 float[] getCentroid()
          Gets the vector for the cluster centroid.
 java.lang.String getCentroidLabel()
          Gets the label for this cluster.
 int getItemCount()
          The number of items in this cluster.
 float getSimilarity(T item)
          Gets the similarity score of the specified item with the centroid of this cluster.
 java.lang.Iterable<anl.aida.util.ObjScore<T>> items()
          Gets an iterable over all the items and score in this cluster.
 

Method Detail

getCentroidLabel

java.lang.String getCentroidLabel()
Gets the label for this cluster. This can be a list of keywords or a descriptive label, etc.

Returns:
the label for this cluster

getItemCount

int getItemCount()
The number of items in this cluster.

Returns:
the number of items in this cluster

getCentroid

float[] getCentroid()
Gets the vector for the cluster centroid.

Returns:

getSimilarity

float getSimilarity(T item)
Gets the similarity score of the specified item with the centroid of this cluster.

Parameters:
item - the item whose score we want
Returns:
the similarity score of the specified item with the centroid of this cluster.

items

java.lang.Iterable<anl.aida.util.ObjScore<T>> items()
Gets an iterable over all the items and score in this cluster.

Returns:
an iterable over all the items and score in this cluster.