org.apache.lucene.search.similarities

## Class IndependenceChiSquared

- java.lang.Object
- - org.apache.lucene.search.similarities.Independence
  - - org.apache.lucene.search.similarities.IndependenceChiSquared

-     public class IndependenceChiSquared
      extends Independence

  Normalized chi-squared measure of distance from independence

  Described as: "can be used for tasks that require high precision, against both short and long queries."

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

- - ### Constructor Summary

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

  - ### Method Summary

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

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

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

- - ### Constructor Detail

    - #### IndependenceChiSquared

          public IndependenceChiSquared()

      Sole constructor.

  - ### Method Detail

    - #### score

          public double score(double freq,
                              double expected)

      Description copied from class: `Independence`
      Computes distance from independence
      Specified by:
        `score` in class `Independence`
      Parameters:
        `freq` - actual term frequency
        `expected` - expected term frequency

    - #### toString

          public String toString()

      Specified by:
        `toString` in class `Independence`

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