datapreparation.weighting
Class WeightHelper

java.lang.Object
  extended by datapreparation.weighting.WeightHelper

public class WeightHelper
extends java.lang.Object

Class implementing all weighting functions used in the application.

Author:
Kjell-Inge Skogstad and Trond Řivind Eriksen

Constructor Summary
WeightHelper()
           
 
Method Summary
static double computeTfIdf(int numDocsTotal, int numDocsOcc, int nOccMax, int nOccThisDoc)
          method implementing the computation of a TfIdf weight.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeightHelper

public WeightHelper()
Method Detail

computeTfIdf

public static double computeTfIdf(int numDocsTotal,
                                  int numDocsOcc,
                                  int nOccMax,
                                  int nOccThisDoc)
method implementing the computation of a TfIdf weight.

Parameters:
numDocsTotal - Total number of documents
numDocsOcc - Number of documents that contain current item
nOccMax - Frequency of the most frequent item in current document
nOccThisDoc - Frequenco of this item in current document
Returns:
The weight