pitt.search.semanticvectors
Class ClusterVectorStore

java.lang.Object
  extended by pitt.search.semanticvectors.ClusterVectorStore

public class ClusterVectorStore
extends java.lang.Object

This class is used for performing kMeans clustering on an entire vector store. It presumes thae the vector store to be clustered is represented in a file in text format (since it's unlikely that you'd want to try this on large files anyway.

See Also:
ClusterResults

Constructor Summary
ClusterVectorStore()
           
 
Method Summary
static void clusterOverlapMeasure(int[] clusterIDs, ObjectVector[] vectors)
           
static java.lang.String getBookFromPath(java.lang.String path)
          Small utility for work with the Bible.
static java.lang.String[] getCluster(int ID, int[] clusterIDs, java.lang.String[] names)
           
static int getMaxValue(int[] values)
           
static void main(java.lang.String[] args)
          Takes a number of clusters and a vector store (presumed to be text format) as arguments and prints out clusters.
static void usage()
          Prints the following usage message: ClusterVectorStore class for clustering an entire (text) vector store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusterVectorStore

public ClusterVectorStore()
Method Detail

usage

public static void usage()
Prints the following usage message: ClusterVectorStore class for clustering an entire (text) vector store.
Usage: java.pitt.search.semanticvectors.ClusterVectorStore VECTORFILE
Use --numclusters to change the number of clusters. Do not try this for large vector stores, it will not scale well!


getBookFromPath

public static java.lang.String getBookFromPath(java.lang.String path)
Small utility for work with the Bible. Assumes input like "bible_chapters/Matthew/Chapter_9".


getMaxValue

public static int getMaxValue(int[] values)

getCluster

public static java.lang.String[] getCluster(int ID,
                                            int[] clusterIDs,
                                            java.lang.String[] names)

clusterOverlapMeasure

public static void clusterOverlapMeasure(int[] clusterIDs,
                                         ObjectVector[] vectors)

main

public static void main(java.lang.String[] args)
                 throws java.lang.IllegalArgumentException
Takes a number of clusters and a vector store (presumed to be text format) as arguments and prints out clusters.

Throws:
java.lang.IllegalArgumentException