org.apache.lucene.search.similarities

## 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 Summary

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

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract double` | `score(double freq, double expected)` Computes distance from independence
    `abstract String` | `toString()`

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

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

- - ### Constructor Detail

    - #### Independence

          public Independence()

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

  - ### Method Detail

    - #### 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`

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