Class AxiomaticF1EXP
- java.lang.Object
- 
- org.apache.lucene.search.similarities.Similarity
- 
- org.apache.lucene.search.similarities.SimilarityBase
- 
- org.apache.lucene.search.similarities.Axiomatic
- 
- org.apache.lucene.search.similarities.AxiomaticF1EXP
 
 
 
 
- 
 public class AxiomaticF1EXP extends Axiomatic F1EXP is defined as Sum(tf(term_doc_freq)*ln(docLen)*IDF(term)) where IDF(t) = pow((N+1)/df(t), k) N=total num of docs, df=doc freq- WARNING: This API is experimental and might change in incompatible ways in the next release.
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.apache.lucene.search.similarities.SimilaritySimilarity.SimScorer
 
- 
 - 
Field Summary- 
Fields inherited from class org.apache.lucene.search.similarities.SimilarityBasediscountOverlaps
 
- 
 - 
Constructor SummaryConstructors Constructor Description AxiomaticF1EXP()Default constructorAxiomaticF1EXP(float s)Constructor setting s only, letting k and queryLen to defaultAxiomaticF1EXP(float s, float k)Constructor setting s and k, letting queryLen to default
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected doublegamma(BasicStats stats, double freq, double docLen)compute the gamma componentprotected doubleidf(BasicStats stats, double freq, double docLen)compute the inverted document frequency componentprotected ExplanationidfExplain(BasicStats stats, double freq, double docLen)Explain the score of the inverted document frequency component for a single documentprotected doubleln(BasicStats stats, double freq, double docLen)compute the document length componentprotected ExplanationlnExplain(BasicStats stats, double freq, double docLen)Explain the score of the document length component for a single documentprotected doubletf(BasicStats stats, double freq, double docLen)compute the term frequency componentprotected ExplanationtfExplain(BasicStats stats, double freq, double docLen)Explain the score of the term frequency component for a single documentprotected doubletfln(BasicStats stats, double freq, double docLen)compute the mixed term frequency and document length componentprotected ExplanationtflnExplain(BasicStats stats, double freq, double docLen)Explain the score of the mixed term frequency and document length component for a single documentStringtoString()Name of the axiomatic method.- 
Methods inherited from class org.apache.lucene.search.similarities.Axiomaticexplain, explain, score
 - 
Methods inherited from class org.apache.lucene.search.similarities.SimilarityBasecomputeNorm, fillBasicStats, getDiscountOverlaps, log2, newStats, scorer, setDiscountOverlaps
 
- 
 
- 
- 
- 
Constructor Detail- 
AxiomaticF1EXPpublic AxiomaticF1EXP(float s, float k)Constructor setting s and k, letting queryLen to default- Parameters:
- s- hyperparam for the growth function
- k- hyperparam for the primitive weighting function
 
 - 
AxiomaticF1EXPpublic AxiomaticF1EXP(float s) Constructor setting s only, letting k and queryLen to default- Parameters:
- s- hyperparam for the growth function
 
 - 
AxiomaticF1EXPpublic AxiomaticF1EXP() Default constructor
 
- 
 - 
Method Detail- 
toStringpublic String toString() Description copied from class:AxiomaticName of the axiomatic method.
 - 
tfprotected double tf(BasicStats stats, double freq, double docLen) compute the term frequency component
 - 
lnprotected double ln(BasicStats stats, double freq, double docLen) compute the document length component
 - 
tflnprotected double tfln(BasicStats stats, double freq, double docLen) compute the mixed term frequency and document length component
 - 
idfprotected double idf(BasicStats stats, double freq, double docLen) compute the inverted document frequency component
 - 
gammaprotected double gamma(BasicStats stats, double freq, double docLen) compute the gamma component
 - 
tfExplainprotected Explanation tfExplain(BasicStats stats, double freq, double docLen) Description copied from class:AxiomaticExplain the score of the term frequency component for a single document
 - 
lnExplainprotected Explanation lnExplain(BasicStats stats, double freq, double docLen) Description copied from class:AxiomaticExplain the score of the document length component for a single document
 - 
tflnExplainprotected Explanation tflnExplain(BasicStats stats, double freq, double docLen) Description copied from class:AxiomaticExplain the score of the mixed term frequency and document length component for a single document- Specified by:
- tflnExplainin class- Axiomatic
- Parameters:
- stats- the corpus level statistics
- freq- number of occurrences of term in the document
- docLen- the document length
- Returns:
- Explanation of how the tfln component was computed
 
 - 
idfExplainprotected Explanation idfExplain(BasicStats stats, double freq, double docLen) Description copied from class:AxiomaticExplain the score of the inverted document frequency component for a single document- Specified by:
- idfExplainin class- Axiomatic
- Parameters:
- stats- the corpus level statistics
- freq- number of occurrences of term in the document
- docLen- the document length
- Returns:
- Explanation of how the idf component was computed
 
 
- 
 
-