Method Idf
Idf(Int32, Int32)
Computes a score factor based on a term's document frequency (the number of documents which contain the term). This value is multiplied by the Tf(Int32) factor for each term in the query and these products are then summed to form the initial score for a document.
Terms that occur in fewer documents are better indicators of topic, so implementations of this method usually return larger values for rare terms, and smaller values for common terms.
Declaration
public abstract float Idf(int docFreq, int numDocs)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | docFreq | the number of documents which contain the term |
System.Int32 | numDocs | the total number of documents in the collection |
Returns
Type | Description |
---|---|
System.Single | a score factor based on the term's document frequency |