|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.terrier.matching.models.WeightingModel org.terrier.matching.models.ML2
public class ML2
This class implements the ML2 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.
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 | |
---|---|
ML2(java.lang.String[] parameters)
Constructs an instance of ML2 |
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 |
---|
protected int fieldCount
protected double[] fieldWeights
protected double[] p
protected int[] fieldTermFrequencies
Constructor Detail |
---|
public ML2(java.lang.String[] parameters) throws java.lang.Exception
parameters
-
java.lang.Exception
Method Detail |
---|
public java.lang.String getInfo()
WeightingModel
getInfo
in interface Model
getInfo
in class WeightingModel
public void prepare()
WeightingModel
prepare
in class WeightingModel
public void setCollectionStatistics(CollectionStatistics _cs)
WeightingModel
setCollectionStatistics
in class WeightingModel
public void setEntryStatistics(EntryStatistics _es)
WeightingModel
setEntryStatistics
in class WeightingModel
public double score(Posting _p)
WeightingModel
score
in class WeightingModel
public double score(double tf, double docLength)
WeightingModel
score
in class WeightingModel
tf
- The term frequency in the documentdocLength
- the document's length
public double score(double tf, double docLength, double n_t, double F_t, double keyFrequency)
WeightingModel
score
in class WeightingModel
tf
- The term frequency in the documentdocLength
- the document's lengthn_t
- The document frequency of the termF_t
- the term frequency in the collectionkeyFrequency
- the term frequency in the query
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |