org.apache.lucene.search.similarities

## 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.Similarity

      `Similarity.SimScorer, Similarity.SimWeight`

  - ### Field Summary

    - ### Fields inherited from class org.apache.lucene.search.similarities.Axiomatic

      `k, queryLen, s`

    - ### Fields inherited from class org.apache.lucene.search.similarities.SimilarityBase

      `discountOverlaps`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AxiomaticF1EXP()` Default constructor
    `AxiomaticF1EXP(float s)` Constructor setting s only, letting k and queryLen to default
    `AxiomaticF1EXP(float s, float k)` Constructor setting s and k, letting queryLen to default

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected float` | `gamma(BasicStats stats, float freq, float docLen)` compute the gamma component
    `protected float` | `idf(BasicStats stats, float freq, float docLen)` compute the inverted document frequency component
    `protected float` | `ln(BasicStats stats, float freq, float docLen)` compute the document length component
    `protected float` | `tf(BasicStats stats, float freq, float docLen)` compute the term frequency component
    `protected float` | `tfln(BasicStats stats, float freq, float docLen)` compute the mixed term frequency and document length component
    `String` | `toString()` Name of the axiomatic method.

    - ### Methods inherited from class org.apache.lucene.search.similarities.Axiomatic

      `explain, score`

    - ### Methods inherited from class org.apache.lucene.search.similarities.SimilarityBase

      `computeNorm, computeWeight, explain, fillBasicStats, getDiscountOverlaps, log2, newStats, setDiscountOverlaps, simScorer`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### AxiomaticF1EXP

          public 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

    - #### AxiomaticF1EXP

          public AxiomaticF1EXP(float s)

      Constructor setting s only, letting k and queryLen to default
      Parameters:
        `s` - hyperparam for the growth function

    - #### AxiomaticF1EXP

          public AxiomaticF1EXP()

      Default constructor

  - ### Method Detail

    - #### toString

          public String toString()

      Description copied from class: `Axiomatic`
      Name of the axiomatic method.
      Specified by:
        `toString` in class `Axiomatic`

    - #### tf

          protected float tf(BasicStats stats,
                             float freq,
                             float docLen)

      compute the term frequency component
      Specified by:
        `tf` in class `Axiomatic`

    - #### ln

          protected float ln(BasicStats stats,
                             float freq,
                             float docLen)

      compute the document length component
      Specified by:
        `ln` in class `Axiomatic`

    - #### tfln

          protected float tfln(BasicStats stats,
                               float freq,
                               float docLen)

      compute the mixed term frequency and document length component
      Specified by:
        `tfln` in class `Axiomatic`

    - #### idf

          protected float idf(BasicStats stats,
                              float freq,
                              float docLen)

      compute the inverted document frequency component
      Specified by:
        `idf` in class `Axiomatic`

    - #### gamma

          protected float gamma(BasicStats stats,
                                float freq,
                                float docLen)

      compute the gamma component
      Specified by:
        `gamma` in class `Axiomatic`

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.