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 intfieldCountprotected int[]fieldTermFrequenciesprotected double[]fieldWeightsprotected 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.StringgetInfo()Returns the name of the model.voidprepare()preparedoublescore(double tf, double docLength)This method provides the contract for implementing weighting models.doublescore(Posting _p)Returns scorevoidsetCollectionStatistics(CollectionStatistics _cs)Sets collection statisticsvoidsetEntryStatistics(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:WeightingModelReturns the name of the model.- Specified by:
getInfoin interfaceModel- Specified by:
getInfoin classWeightingModel- Returns:
- java.lang.String
-
prepare
public void prepare()
Description copied from class:WeightingModelprepare- Overrides:
preparein classWeightingModel
-
setCollectionStatistics
public void setCollectionStatistics(CollectionStatistics _cs)
Description copied from class:WeightingModelSets collection statistics- Overrides:
setCollectionStatisticsin classWeightingModel
-
setEntryStatistics
public void setEntryStatistics(EntryStatistics _es)
Sets entry statistics.- Overrides:
setEntryStatisticsin classWeightingModel
-
score
public double score(Posting _p)
Returns score- Overrides:
scorein classWeightingModel- Returns:
- score
-
score
public double score(double tf, double docLength)Description copied from class:WeightingModelThis method provides the contract for implementing weighting models.- Specified by:
scorein 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
-
-