Class NXYSignificanceHeuristic
java.lang.Object
org.elasticsearch.search.aggregations.bucket.terms.heuristic.SignificanceHeuristic
org.elasticsearch.search.aggregations.bucket.terms.heuristic.NXYSignificanceHeuristic
- All Implemented Interfaces:
NamedWriteable
,Writeable
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentFragment
- Direct Known Subclasses:
ChiSquare
,GND
,MutualInformation
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
protected static class
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Modifier and TypeFieldDescriptionprotected static org.elasticsearch.common.xcontent.ParseField
protected boolean
protected static org.elasticsearch.common.xcontent.ParseField
protected boolean
Some heuristics do not differentiate between terms that are descriptive for subset or for the background without the subset.protected static String
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ModifierConstructorDescriptionprotected
NXYSignificanceHeuristic(boolean includeNegatives, boolean backgroundIsSuperset)
protected
Read from a stream. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
build(org.elasticsearch.common.xcontent.XContentBuilder builder)
buildFromParsedArgs(BiFunction<Boolean,Boolean,T> ctor)
Adapt a standard two argument ctor into one that consumes a ConstructingObjectParser's fields.protected void
checkFrequencies(long subsetFreq, long subsetSize, long supersetFreq, long supersetSize, String scoreFunctionName)
protected NXYSignificanceHeuristic.Frequencies
computeNxys(long subsetFreq, long subsetSize, long supersetFreq, long supersetSize, String scoreFunctionName)
protected static void
declareParseFields(org.elasticsearch.common.xcontent.ConstructingObjectParser<? extends NXYSignificanceHeuristic,?> parser)
Set up and ConstructingObjectParser to accept the standard arguments for an NXYSignificanceHeuristic.boolean
int
hashCode()
void
writeTo(StreamOutput out)
Write this into the StreamOutput.Methods inherited from class org.elasticsearch.search.aggregations.bucket.terms.heuristic.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 Details
-
BACKGROUND_IS_SUPERSET
protected static final org.elasticsearch.common.xcontent.ParseField BACKGROUND_IS_SUPERSET -
INCLUDE_NEGATIVES_FIELD
protected static final org.elasticsearch.common.xcontent.ParseField INCLUDE_NEGATIVES_FIELD -
SCORE_ERROR_MESSAGE
-
backgroundIsSuperset
protected final boolean backgroundIsSuperset -
includeNegatives
protected final boolean includeNegativesSome 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 Details
-
NXYSignificanceHeuristic
protected NXYSignificanceHeuristic(boolean includeNegatives, boolean backgroundIsSuperset) -
NXYSignificanceHeuristic
Read from a stream.- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
computeNxys
protected NXYSignificanceHeuristic.Frequencies computeNxys(long subsetFreq, long subsetSize, long supersetFreq, long supersetSize, String scoreFunctionName) -
checkFrequencies
protected void checkFrequencies(long subsetFreq, long subsetSize, long supersetFreq, long supersetSize, String scoreFunctionName) -
build
- Throws:
IOException
-
declareParseFields
protected static void declareParseFields(org.elasticsearch.common.xcontent.ConstructingObjectParser<? extends NXYSignificanceHeuristic,?> parser)Set up and ConstructingObjectParser to accept the standard arguments for an NXYSignificanceHeuristic. -
buildFromParsedArgs
Adapt a standard two argument ctor into one that consumes a ConstructingObjectParser's fields.
-