Package org.terrier.matching.dsms
Class MRFDependenceScoreModifier
- java.lang.Object
-
- org.terrier.matching.dsms.DependenceScoreModifier
-
- org.terrier.matching.dsms.MRFDependenceScoreModifier
-
- All Implemented Interfaces:
java.lang.Cloneable
,DocumentScoreModifier
public class MRFDependenceScoreModifier extends DependenceScoreModifier
Implements Markov Random Fields. See Metzler & Croft, SIGIR 2005. Note that this implementation does not utilise the frequency of a tuple in the collection - instead, this is assumed to be a constant, as per the implementation in the Ivory retrieval system. Properties:- See properties for DependenceScoreModifier
- mrf.mu - Mu of MRF model, in the Dirichlet model.
- Since:
- 3.0
- Author:
- Craig Macdonald
-
-
Field Summary
Fields Modifier and Type Field Description protected double
MU
-
Fields inherited from class org.terrier.matching.dsms.DependenceScoreModifier
avgDocLen, dependency, logger, ngramLength, numTokens, phraseQTWfnid, phraseTerms, w_o, w_t, w_u
-
-
Constructor Summary
Constructors Constructor Description MRFDependenceScoreModifier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
modifyScores(Index index, MatchingQueryTerms terms, ResultSet set)
Modifies the scores of documents, in which there exist, or there does not exist a given phrase.protected double
scoreFDSD(int matchingNGrams, int _docLength)
void
setCollectionStatistics(CollectionStatistics cs, Index _index)
Sets the collection statistics used to score the documents (number of documents in the collection, etc)-
Methods inherited from class org.terrier.matching.dsms.DependenceScoreModifier
calculateDependence, clone, countTrue, determineGlobalStatistics, doDependency, getName, NOR, openPostingLists, score, scoreFDSD
-
-
-
-
Method Detail
-
modifyScores
public boolean modifyScores(Index index, MatchingQueryTerms terms, ResultSet set)
Modifies the scores of documents, in which there exist, or there does not exist a given phrase.- Specified by:
modifyScores
in interfaceDocumentScoreModifier
- Overrides:
modifyScores
in classDependenceScoreModifier
- Parameters:
index
- Index the data structures to use.terms
- MatchingQueryTerms the terms to be matched for the query. This does not correspond to the phrase terms necessarily, but to all the terms of the query.set
- ResultSet the result set for the query.- Returns:
- true if any scores have been altered
-
scoreFDSD
protected double scoreFDSD(int matchingNGrams, int _docLength)
- Specified by:
scoreFDSD
in classDependenceScoreModifier
-
setCollectionStatistics
public void setCollectionStatistics(CollectionStatistics cs, Index _index)
Sets the collection statistics used to score the documents (number of documents in the collection, etc)- Overrides:
setCollectionStatistics
in classDependenceScoreModifier
-
-