idl.tmt.representation
Class GenericHardClustering

java.lang.Object
  |
  +--idl.tmt.representation.GenericHardClustering
All Implemented Interfaces:
Clustering, HardClustering

public class GenericHardClustering
extends java.lang.Object
implements HardClustering

A generic hard clustering that can be built from a soft clustering. Simply choose the cluster with the highest probability for cluster membership. Created on Apr 14, 2004

Author:
jelsas

Inner Class Summary
private  class GenericHardClustering.GenericHardCluster
           
 
Field Summary
private  Cluster[] clusters
           
private  IndexedCollection collection
           
private  int[] hardClustering
           
private  LogOddsUtil logOddsUtil
           
private  TermFrequencyUtil termFreqUtil
           
 
Constructor Summary
GenericHardClustering(SoftClustering softCl, IndexedCollection collection)
           
 
Method Summary
private  void checkLOU()
          Checks to make sure the logOddsUtil member has been instantiated, just to support lazyness.
private  void checkTFU()
          Checks to make sure the termFreqUtil member has been instantiated, just to support lazyness.
 Cluster getCluster(int clusterIndex)
          Returns the cluster associated with this cluster ID
 int getClusterMembership(int docID)
          returns the clusterID that this document belongs to
 int getNumClusters()
          returns the number of clusters in this clustering
 int getNumDocuments()
          Returns the number of documents in this clustering
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

hardClustering

private int[] hardClustering

clusters

private Cluster[] clusters

collection

private IndexedCollection collection

logOddsUtil

private LogOddsUtil logOddsUtil

termFreqUtil

private TermFrequencyUtil termFreqUtil
Constructor Detail

GenericHardClustering

public GenericHardClustering(SoftClustering softCl,
                             IndexedCollection collection)
Method Detail

getClusterMembership

public int getClusterMembership(int docID)
returns the clusterID that this document belongs to
Specified by:
getClusterMembership in interface HardClustering
See Also:
HardClustering.getClusterMembership(int)

getNumClusters

public int getNumClusters()
returns the number of clusters in this clustering
Specified by:
getNumClusters in interface Clustering
See Also:
Clustering.getNumClusters()

getCluster

public Cluster getCluster(int clusterIndex)
Returns the cluster associated with this cluster ID
Specified by:
getCluster in interface Clustering
See Also:
Clustering.getCluster(int)

getNumDocuments

public int getNumDocuments()
Returns the number of documents in this clustering
Specified by:
getNumDocuments in interface Clustering
See Also:
Clustering.getNumDocuments()

checkLOU

private void checkLOU()
Checks to make sure the logOddsUtil member has been instantiated, just to support lazyness.

checkTFU

private void checkTFU()
Checks to make sure the termFreqUtil member has been instantiated, just to support lazyness.