Class MutualInformation

All Implemented Interfaces:
NamedWriteable, Writeable, ToXContent, ToXContentFragment

public class MutualInformation
extends NXYSignificanceHeuristic
  • Field Details

  • Constructor Details

    • MutualInformation

      public MutualInformation​(boolean includeNegatives, boolean backgroundIsSuperset)
    • MutualInformation

      public MutualInformation​(StreamInput in) throws
      Read from a stream.
  • Method Details

    • equals

      public boolean equals​(java.lang.Object other)
      equals in class NXYSignificanceHeuristic
    • hashCode

      public int hashCode()
      hashCode in class NXYSignificanceHeuristic
    • getScore

      public double getScore​(long subsetFreq, long subsetSize, long supersetFreq, long supersetSize)
      Calculates mutual information see "Information Retrieval", Manning et al., Eq. 13.17
      Specified by:
      getScore in class SignificanceHeuristic
      subsetFreq - The frequency of the term in the selected sample
      subsetSize - The size of the selected sample (typically number of docs)
      supersetFreq - The frequency of the term in the superset from which the sample was taken
      supersetSize - The size of the superset from which the sample was taken (typically number of docs)
      a "significance" score
    • getWriteableName

      public java.lang.String getWriteableName()
      Description copied from interface: NamedWriteable
      Returns the name of the writeable object
    • toXContent

      public XContentBuilder toXContent​(XContentBuilder builder, ToXContent.Params params) throws