|
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.Idf
public final class Idf
This class computes the idf values for specific terms in the collection.
Field Summary | |
---|---|
static double |
LOG_2_OF_E
The natural logarithm of 2, used to change the base of logarithms. |
static double |
REC_LOG_2_OF_E
The reciprocal of CONSTANT, computed for efficiency. |
Constructor Summary | |
---|---|
Idf()
A default constructor. |
|
Idf(double docs)
A constructor specifying the number of documents in the collection. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Make a perfect clone of this object |
double |
idf(double d)
Returns the idf of d. |
double |
idf(int d)
Returns the idf of the given number d. |
double |
idfDFR(double d)
Returns the idf of d. |
double |
idfDFR(int d)
Returns the idf of the given number d. |
double |
idfENQUIRY(double d)
The INQUERY idf formula. |
double |
idfN(double d)
Return the normalised idf of the given number. |
double |
idfN(int d)
Return the normalised idf of the given number. |
double |
idfNENQUIRY(double d)
The normalised INQUERY idf formula |
static double |
log(double d)
Returns the base 2 log of the given double precision number. |
static double |
log(double d1,
double d2)
Returns the base 2 log of d1 over d2 |
void |
setNumberOfDocuments(double N)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double LOG_2_OF_E
public static final double REC_LOG_2_OF_E
Constructor Detail |
---|
public Idf()
public Idf(double docs)
docs
- The number of documents.Method Detail |
---|
public java.lang.Object clone()
clone
in class java.lang.Object
public final double idf(double d)
d
- The given term frequency
public final double idf(int d)
d
- the number for which the idf will be computed.
public final double idfDFR(double d)
d
- The given term frequency
public final double idfDFR(int d)
d
- the number for which the idf will be computed.
public final double idfENQUIRY(double d)
d
- the number for which the idf will be computed
public final double idfN(double d)
d
- The number of which the idf is computed.
public void setNumberOfDocuments(double N)
public final double idfN(int d)
d
- The number of which the idf is computed.
public final double idfNENQUIRY(double d)
d
- the number for which we will compute the normalised idf
public static final double log(double d)
d
- The number of which the log we will compute
public static final double log(double d1, double d2)
d1
- the nominatord2
- the denominator
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |