|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 |
static void |
main(java.lang.String[] args)
main |
void |
setNumberOfDocuments(double N)
Set number of documents |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, 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.Objectpublic double idf(double d)
d - The given term frequency
public double idf(int d)
d - the number for which the idf will be computed.
public double idfDFR(double d)
d - The given term frequency
public double idfDFR(int d)
d - the number for which the idf will be computed.
public double idfENQUIRY(double d)
d - the number for which the idf will be computed
public double idfN(double d)
d - The number of which the idf is computed.
public void setNumberOfDocuments(double N)
N - the number of ducumentspublic double idfN(int d)
d - The number of which the idf is computed.
public double idfNENQUIRY(double d)
d - the number for which we will compute the normalised idf
public static double log(double d)
d - The number of which the log we will compute
public static double log(double d1,
double d2)
d1 - the nominatord2 - the denominator
public static void main(java.lang.String[] args)
args -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||