Class BucketKsAggregation
java.lang.Object
co.elastic.clients.elasticsearch._types.aggregations.AggregationBase
co.elastic.clients.elasticsearch._types.aggregations.BucketPathAggregation
co.elastic.clients.elasticsearch._types.aggregations.BucketKsAggregation
- All Implemented Interfaces:
AggregationVariant
,JsonpSerializable
@JsonpDeserializable
public class BucketKsAggregation
extends BucketPathAggregation
implements AggregationVariant
A sibling pipeline aggregation which executes a two sample Kolmogorov–Smirnov
test (referred to as a "K-S test" from now on) against a provided
distribution, and the distribution implied by the documents counts in the
configured sibling aggregation. Specifically, for some metric, assuming that
the percentile intervals of the metric are known beforehand or have been
computed by an aggregation, then one would use range aggregation for the
sibling to compute the p-value of the distribution difference between the
metric and the restriction of that metric to a subset of the documents. A
natural use case is if the sibling aggregation range aggregation nested in a
terms aggregation, in which case one compares the overall distribution of
metric to its restriction to each term.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.aggregations.BucketPathAggregation
BucketPathAggregation.AbstractBuilder<BuilderT extends BucketPathAggregation.AbstractBuilder<BuilderT>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JsonpDeserializer<BucketKsAggregation>
Json deserializer forBucketKsAggregation
-
Method Summary
Modifier and TypeMethodDescriptionAggregation variant kind.A list of string values indicating which K-S test alternative to calculate.A list of doubles indicating the distribution of the samples with which to compare to thebuckets_path
results.static BucketKsAggregation
final String
Indicates the sampling methodology when calculating the K-S test.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
Methods inherited from class co.elastic.clients.elasticsearch._types.aggregations.BucketPathAggregation
bucketsPath, setupBucketPathAggregationDeserializer
Methods inherited from class co.elastic.clients.elasticsearch._types.aggregations.AggregationBase
meta, name, serialize, setupAggregationBaseDeserializer, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface co.elastic.clients.elasticsearch._types.aggregations.AggregationVariant
_toAggregation
-
Field Details
-
_DESERIALIZER
Json deserializer forBucketKsAggregation
-
-
Method Details
-
of
public static BucketKsAggregation of(Function<BucketKsAggregation.Builder, ObjectBuilder<BucketKsAggregation>> fn) -
_aggregationKind
Aggregation variant kind.- Specified by:
_aggregationKind
in interfaceAggregationVariant
-
alternative
A list of string values indicating which K-S test alternative to calculate. The valid values are: "greater", "less", "two_sided". This parameter is key for determining the K-S statistic used when calculating the K-S test. Default value is all possible alternative hypotheses.API name:
alternative
-
fractions
A list of doubles indicating the distribution of the samples with which to compare to thebuckets_path
results. In typical usage this is the overall proportion of documents in each bucket, which is compared with the actual document proportions in each bucket from the sibling aggregation counts. The default is to assume that overall documents are uniformly distributed on these buckets, which they would be if one used equal percentiles of a metric to define the bucket end points.API name:
fractions
-
samplingMethod
Indicates the sampling methodology when calculating the K-S test. Note, this is sampling of the returned values. This determines the cumulative distribution function (CDF) points used comparing the two samples. Default isupper_tail
, which emphasizes the upper end of the CDF points. Valid options are:upper_tail
,uniform
, andlower_tail
.API name:
sampling_method
-
serializeInternal
- Overrides:
serializeInternal
in classBucketPathAggregation
-
setupBucketKsAggregationDeserializer
protected static void setupBucketKsAggregationDeserializer(ObjectDeserializer<BucketKsAggregation.Builder> op)
-