Class Independence

java.lang.Object
org.apache.lucene.search.similarities.Independence
Direct Known Subclasses:
IndependenceChiSquared, IndependenceSaturated, IndependenceStandardized

public abstract class Independence extends Object
Computes the measure of divergence from independence for DFI scoring functions.

See http://trec.nist.gov/pubs/trec21/papers/irra.web.nb.pdf for more information on different methods.

WARNING: This API is experimental and might change in incompatible ways in the next release.
  • Constructor Details

    • Independence

      public Independence()
      Sole constructor. (For invocation by subclass constructors, typically implicit.)
  • Method Details

    • score

      public abstract double score(double freq, double expected)
      Computes distance from independence
      Parameters:
      freq - actual term frequency
      expected - expected term frequency
    • toString

      public abstract String toString()
      Overrides:
      toString in class Object