idl.tmt.util
Class LogOddsUtil

java.lang.Object
  |
  +--idl.tmt.util.LogOddsUtil

public class LogOddsUtil
extends java.lang.Object

Created on Apr 2, 2004

Author:
jelsas

Field Summary
private  IndexedCollection collection
           
private static double LOG_2
           
private  double[][] logOddsRatios
           
private  int numClusters
           
private  int numDocs
           
private  int[][] numDocsWithTerm
           
private  int numTerms
           
private static double SMOOTHING_FACTOR
           
private  int[][] termIDByRank
           
 
Constructor Summary
LogOddsUtil(IndexedCollection collection, HardClustering clustering)
           
 
Method Summary
private  void calculateLogOddsRatios()
           
private  void calculateNumDocsWithTerm(HardClustering clustering)
           
private  void calculateTermIDByRank()
           
 double getLogOddsForTerm(int clusterID, int termID)
           
 int getTermIDByRank(int rank, int clusterID)
           
 java.util.ArrayList getTopNterms(int n, int clusterID)
           
 void printBottomNTerms(int n)
           
 void printTopNLabelCandidates(int n)
           
 void printTopNTerms(int n)
           
 int[] topNTerms(int n, int clusterID)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

numClusters

private int numClusters

numTerms

private int numTerms

numDocs

private int numDocs

collection

private IndexedCollection collection

numDocsWithTerm

private int[][] numDocsWithTerm

logOddsRatios

private double[][] logOddsRatios

termIDByRank

private int[][] termIDByRank

SMOOTHING_FACTOR

private static final double SMOOTHING_FACTOR

LOG_2

private static final double LOG_2
Constructor Detail

LogOddsUtil

public LogOddsUtil(IndexedCollection collection,
                   HardClustering clustering)
Method Detail

calculateNumDocsWithTerm

private void calculateNumDocsWithTerm(HardClustering clustering)

calculateLogOddsRatios

private void calculateLogOddsRatios()

calculateTermIDByRank

private void calculateTermIDByRank()

getLogOddsForTerm

public double getLogOddsForTerm(int clusterID,
                                int termID)

printTopNTerms

public void printTopNTerms(int n)

getTopNterms

public java.util.ArrayList getTopNterms(int n,
                                        int clusterID)

topNTerms

public int[] topNTerms(int n,
                       int clusterID)

getTermIDByRank

public int getTermIDByRank(int rank,
                           int clusterID)

printBottomNTerms

public void printBottomNTerms(int n)

printTopNLabelCandidates

public void printTopNLabelCandidates(int n)