Package org.terrier.matching.models
Class MDL2
- java.lang.Object
-
- org.terrier.matching.models.WeightingModel
-
- 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
:- c.0, c.1, etc. Normalisation parameter for each field.
- p.0, p.1, etc. Prior weight adjustments for each field. In the original paper, all of these were left at the default value of 1.0d.
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
Fields Modifier and Type Field Description protected int
fieldCount
protected int[]
fieldTermFrequencies
protected double[]
fieldWeights
protected double[]
p
-
Fields inherited from class org.terrier.matching.models.WeightingModel
averageDocumentLength, c, cs, documentFrequency, es, i, keyFrequency, numberOfDocuments, numberOfPointers, numberOfPostings, numberOfTokens, numberOfUniqueTerms, rq, termFrequency
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getInfo()
Returns the name of the model.void
prepare()
preparedouble
score(double tf, double docLength)
This method provides the contract for implementing weighting models.double
score(Posting _p)
Returns scorevoid
setCollectionStatistics(CollectionStatistics _cs)
Sets collection statisticsvoid
setEntryStatistics(EntryStatistics _es)
Sets entry statistics.-
Methods inherited from class org.terrier.matching.models.WeightingModel
clone, getOverflowed, getParameter, setKeyFrequency, setParameter, setRequest
-
-
-
-
Method Detail
-
getInfo
public java.lang.String getInfo()
Description copied from class:WeightingModel
Returns the name of the model.- Specified by:
getInfo
in interfaceModel
- Specified by:
getInfo
in classWeightingModel
- Returns:
- java.lang.String
-
prepare
public void prepare()
Description copied from class:WeightingModel
prepare- Overrides:
prepare
in classWeightingModel
-
setCollectionStatistics
public void setCollectionStatistics(CollectionStatistics _cs)
Description copied from class:WeightingModel
Sets collection statistics- Overrides:
setCollectionStatistics
in classWeightingModel
-
setEntryStatistics
public void setEntryStatistics(EntryStatistics _es)
Sets entry statistics.- Overrides:
setEntryStatistics
in classWeightingModel
-
score
public double score(Posting _p)
Returns score- Overrides:
score
in classWeightingModel
- 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 classWeightingModel
- Parameters:
tf
- The term frequency in the documentdocLength
- the document's length- Returns:
- the score assigned to a document with the given tf and docLength, and other preset parameters
-
-