org.apache.lucene.search.similarities

## Class AfterEffect

- java.lang.Object
- - org.apache.lucene.search.similarities.AfterEffect

- Direct Known Subclasses:
    AfterEffectB, AfterEffectL

      public abstract class AfterEffect
      extends Object

  This class acts as the base class for the implementations of the first normalization of the informative content in the DFR framework. This component is also called the after effect and is defined by the formula Inf2 = 1 - Prob2, where Prob2 measures the information gain.
  See Also:
    `DFRSimilarity`
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AfterEffect()` Sole constructor.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract Explanation` | `explain(BasicStats stats, double tfn)` Returns an explanation for the score.
    `abstract double` | `scoreTimes1pTfn(BasicStats stats)` Returns the product of the after effect with `1+tfn`.
    `abstract String` | `toString()` Subclasses must override this method to return the code of the after effect formula.

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

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

- - ### Constructor Detail

    - #### AfterEffect

          public AfterEffect()

      Sole constructor. (For invocation by subclass constructors, typically implicit.)

  - ### Method Detail

    - #### scoreTimes1pTfn

          public abstract double scoreTimes1pTfn(BasicStats stats)

      Returns the product of the after effect with `1+tfn`. This may not depend on the value of `tfn`.

    - #### explain

          public abstract Explanation explain(BasicStats stats,
                                              double tfn)

      Returns an explanation for the score.

    - #### toString

          public abstract String toString()

      Subclasses must override this method to return the code of the after effect formula. Refer to the original paper for the list.
      Overrides:
        `toString` in class `Object`

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