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 class
NXYSignificanceHeuristic.Frequencies
protected static class
NXYSignificanceHeuristic.NXYBuilder
static class
NXYSignificanceHeuristic.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 ParseField
BACKGROUND_IS_SUPERSET
protected boolean
backgroundIsSuperset
protected static ParseField
INCLUDE_NEGATIVES_FIELD
protected boolean
includeNegatives
Some heuristics do not differentiate between terms that are descriptive for subset or for the background without the subset.protected static java.lang.String
SCORE_ERROR_MESSAGE
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
NXYSignificanceHeuristic(boolean includeNegatives, boolean backgroundIsSuperset)
protected
NXYSignificanceHeuristic(StreamInput in)
Read from a stream.
-
Method Summary
Modifier and Type Method Description protected void
build(XContentBuilder builder)
protected void
checkFrequencies(long subsetFreq, long subsetSize, long supersetFreq, long supersetSize, java.lang.String scoreFunctionName)
protected NXYSignificanceHeuristic.Frequencies
computeNxys(long subsetFreq, long subsetSize, long supersetFreq, long supersetSize, java.lang.String scoreFunctionName)
boolean
equals(java.lang.Object obj)
int
hashCode()
void
writeTo(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:Writeable
Write this into the StreamOutput.- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in 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
-
-