|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.gla.terrier.matching.models.basicmodel.BasicModel
public abstract class BasicModel
This class provides a contract for implementing the basic models for randomness in the DFR framework, for use with the DFRWeightingModel class. This is referred to as the component -log(prob1) in the DFR framework.
DFRWeightingModel
,
Serialized FormConstructor Summary | |
---|---|
BasicModel()
A default constructor that initialises the idf i attribute |
Method Summary | |
---|---|
abstract java.lang.String |
getInfo()
Returns the name of the model. |
abstract double |
score(double tf,
double documentFrequency,
double termFrequency,
double keyFrequency,
double documentLength)
This method provides the contract for implementing weighting models. |
void |
setNumberOfDocuments(double numOfDocs)
Sets the number of documents in the collection. |
void |
setNumberOfTokens(double numTokens)
Set the number of tokens in the collection. |
double |
stirlingPower(double n,
double m)
This method provides the contract for implementing the Stirling formula for the power series. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicModel()
Method Detail |
---|
public abstract java.lang.String getInfo()
public void setNumberOfDocuments(double numOfDocs)
numOfDocs
- the number of documents in the collection.public void setNumberOfTokens(double numTokens)
numTokens
- double The number of tokens in the collection.public abstract double score(double tf, double documentFrequency, double termFrequency, double keyFrequency, double documentLength)
tf
- The term frequency in the documentdocumentFrequency
- The document frequency of the termtermFrequency
- The term frequency of the term in the collectionkeyFrequency
- The normalised query term frequency.documentLength
- The length of the document.
public double stirlingPower(double n, double m)
n
- The parameter of the Stirling formula.m
- The parameter of the Stirling formula.
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |