org.terrier.matching.models
Class MDL2

java.lang.Object
  extended by org.terrier.matching.models.WeightingModel
      extended by org.terrier.matching.models.MDL2
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Model

public class MDL2
extends WeightingModel

This class implements the MDL2 field-based weighting model.

Properties

:

If you use this model, please cite V. Plachouras and I. Ounis, Multinomial Randomness Models for Retrieval with Document Fields, In Proc. ECIR 2007.

Since:
3.0
Author:
Vassilis Plachouras and Craig Macdonald
See Also:
Serialized Form

Field Summary
protected  int fieldCount
           
protected  int[] fieldTermFrequencies
           
protected  double[] fieldWeights
           
protected  double[] p
           
 
Fields inherited from class org.terrier.matching.models.WeightingModel
averageDocumentLength, c, documentFrequency, i, keyFrequency, numberOfDocuments, numberOfPointers, numberOfTokens, numberOfUniqueTerms, termFrequency
 
Constructor Summary
MDL2(java.lang.String[] parameters)
          Constructs an instance of MDL2.
 
Method Summary
 java.lang.String getInfo()
          Returns the name of the model.
 void prepare()
          prepare
 double score(double tf, double docLength)
          This method provides the contract for implementing weighting models.
 double score(double tf, double docLength, double n_t, double F_t, double keyFrequency)
          This method provides the contract for implementing weighting models.
 double score(Posting _p)
          Returns score
 void setCollectionStatistics(CollectionStatistics _cs)
          Sets collection statistics
 void setEntryStatistics(EntryStatistics _es)
          Sets entry statistics.
 
Methods inherited from class org.terrier.matching.models.WeightingModel
clone, getOverflowed, getParameter, setAverageDocumentLength, setDocumentFrequency, setKeyFrequency, setNumberOfDocuments, setNumberOfPointers, setNumberOfTokens, setNumberOfUniqueTerms, setParameter, setRequest, setTermFrequency, stirlingPower
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fieldCount

protected int fieldCount

fieldWeights

protected double[] fieldWeights

p

protected double[] p

fieldTermFrequencies

protected int[] fieldTermFrequencies
Constructor Detail

MDL2

public MDL2(java.lang.String[] parameters)
     throws java.lang.Exception
Constructs an instance of MDL2.

Parameters:
parameters -
Throws:
java.lang.Exception
Method Detail

getInfo

public java.lang.String getInfo()
Description copied from class: WeightingModel
Returns the name of the model.

Specified by:
getInfo in interface Model
Specified by:
getInfo in class WeightingModel
Returns:
java.lang.String

prepare

public void prepare()
Description copied from class: WeightingModel
prepare

Overrides:
prepare in class WeightingModel

setCollectionStatistics

public void setCollectionStatistics(CollectionStatistics _cs)
Description copied from class: WeightingModel
Sets collection statistics

Overrides:
setCollectionStatistics in class WeightingModel

setEntryStatistics

public void setEntryStatistics(EntryStatistics _es)
Description copied from class: WeightingModel
Sets entry statistics.

Overrides:
setEntryStatistics in class WeightingModel

score

public double score(Posting _p)
Description copied from class: WeightingModel
Returns score

Overrides:
score in class WeightingModel
Returns:
score

score

public double score(double tf,
                    double docLength)
Description copied from class: WeightingModel
This method provides the contract for implementing weighting models.

Specified by:
score in class WeightingModel
Parameters:
tf - The term frequency in the document
docLength - the document's length
Returns:
the score assigned to a document with the given tf and docLength, and other preset parameters

score

public double score(double tf,
                    double docLength,
                    double n_t,
                    double F_t,
                    double keyFrequency)
Description copied from class: WeightingModel
This method provides the contract for implementing weighting models.

Specified by:
score in class WeightingModel
Parameters:
tf - The term frequency in the document
docLength - the document's length
n_t - The document frequency of the term
F_t - the term frequency in the collection
keyFrequency - the term frequency in the query
Returns:
the score returned by the implemented weighting model.


Terrier 3.5. Copyright © 2004-2011 University of Glasgow