Class NXYSignificanceHeuristic
- java.lang.Object
-
- org.elasticsearch.search.aggregations.bucket.significant.heuristics.SignificanceHeuristic
-
- org.elasticsearch.search.aggregations.bucket.significant.heuristics.NXYSignificanceHeuristic
-
- All Implemented Interfaces:
NamedWriteable,Writeable,ToXContent,ToXContentFragment
- Direct Known Subclasses:
ChiSquare,GND,MutualInformation
public abstract class NXYSignificanceHeuristic extends SignificanceHeuristic
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classNXYSignificanceHeuristic.Frequenciesprotected static classNXYSignificanceHeuristic.NXYBuilderstatic classNXYSignificanceHeuristic.NXYParser-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Field Summary
Fields Modifier and Type Field Description protected static ParseFieldBACKGROUND_IS_SUPERSETprotected booleanbackgroundIsSupersetprotected static ParseFieldINCLUDE_NEGATIVES_FIELDprotected booleanincludeNegativesSome heuristics do not differentiate between terms that are descriptive for subset or for the background without the subset.protected static java.lang.StringSCORE_ERROR_MESSAGE-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNXYSignificanceHeuristic(boolean includeNegatives, boolean backgroundIsSuperset)protectedNXYSignificanceHeuristic(StreamInput in)Read from a stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbuild(XContentBuilder builder)protected voidcheckFrequencies(long subsetFreq, long subsetSize, long supersetFreq, long supersetSize, java.lang.String scoreFunctionName)protected NXYSignificanceHeuristic.FrequenciescomputeNxys(long subsetFreq, long subsetSize, long supersetFreq, long supersetSize, java.lang.String scoreFunctionName)booleanequals(java.lang.Object obj)inthashCode()voidwriteTo(StreamOutput out)Write this into the StreamOutput.-
Methods inherited from class org.elasticsearch.search.aggregations.bucket.significant.heuristics.SignificanceHeuristic
checkFrequencyValidity, getScore, rewrite, rewrite
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable
getWriteableName
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContent
toXContent
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
-
-
-
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:WriteableWrite this into the StreamOutput.- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.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
-
-