Module org.elasticsearch.server
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,ToXContent,ToXContentFragment
- Direct Known Subclasses:
ChiSquare,GND,MutualInformation
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static classNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final ParseFieldprotected final booleanprotected static final ParseFieldprotected final booleanSome heuristics do not differentiate between terms that are descriptive for subset or for the background without the subset.protected static final StringFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNXYSignificanceHeuristic(boolean includeNegatives, boolean backgroundIsSuperset) protectedRead from a stream. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbuild(XContentBuilder builder) buildFromParsedArgs(BiFunction<Boolean, Boolean, T> ctor) Adapt a standard two argument ctor into one that consumes a ConstructingObjectParser's fields.protected voidcheckFrequencies(long subsetFreq, long subsetSize, long supersetFreq, long supersetSize, String scoreFunctionName) protected NXYSignificanceHeuristic.FrequenciescomputeNxys(long subsetFreq, long subsetSize, long supersetFreq, long supersetSize, String scoreFunctionName) protected static voiddeclareParseFields(ConstructingObjectParser<? extends NXYSignificanceHeuristic, ?> parser) Set up and ConstructingObjectParser to accept the standard arguments for an NXYSignificanceHeuristic.booleaninthashCode()voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.search.aggregations.bucket.terms.heuristic.SignificanceHeuristic
checkFrequencyValidity, getScore, rewrite, rewriteMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable
getWriteableNameMethods inherited from interface org.elasticsearch.xcontent.ToXContent
toXContentMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
BACKGROUND_IS_SUPERSET
-
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:WriteableWrite 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(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.
-