Class NXYSignificanceHeuristic

    • Field Detail

      • BACKGROUND_IS_SUPERSET

        protected static final ParseField BACKGROUND_IS_SUPERSET
      • INCLUDE_NEGATIVES_FIELD

        protected static final ParseField INCLUDE_NEGATIVES_FIELD
      • SCORE_ERROR_MESSAGE

        protected static final java.lang.String SCORE_ERROR_MESSAGE
      • backgroundIsSuperset

        protected final boolean backgroundIsSuperset
      • includeNegatives

        protected final boolean includeNegatives
        Some heuristics do not differentiate between terms that are descriptive for subset or for the background without the subset. We might want to filter out the terms that are appear much less often in the subset than in the background without the subset.
    • Constructor Detail

      • NXYSignificanceHeuristic

        protected NXYSignificanceHeuristic​(boolean includeNegatives,
                                           boolean backgroundIsSuperset)
      • NXYSignificanceHeuristic

        protected NXYSignificanceHeuristic​(StreamInput in)
                                    throws java.io.IOException
        Read from a stream.
        Throws:
        java.io.IOException
    • Method Detail

      • writeTo

        public void writeTo​(StreamOutput out)
                     throws java.io.IOException
        Description copied from interface: Writeable
        Write this into the StreamOutput.
        Throws:
        java.io.IOException
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • computeNxys

        protected NXYSignificanceHeuristic.Frequencies computeNxys​(long subsetFreq,
                                                                   long subsetSize,
                                                                   long supersetFreq,
                                                                   long supersetSize,
                                                                   java.lang.String scoreFunctionName)
      • checkFrequencies

        protected void checkFrequencies​(long subsetFreq,
                                        long subsetSize,
                                        long supersetFreq,
                                        long supersetSize,
                                        java.lang.String scoreFunctionName)
      • build

        protected void build​(XContentBuilder builder)
                      throws java.io.IOException
        Throws:
        java.io.IOException