pub struct BoxplotAggregation { /* private fields */ }
Expand description
A boxplot
metrics aggregation that computes boxplot of numeric values extracted from the
aggregated documents. These values can be generated from specific numeric or histogram fields
in the documents.
The boxplot
aggregation returns essential information for making a box plot:
minimum, maximum median, first quartile (25th percentile) and third quartile (75th percentile) values.
The algorithm used by the boxplot
metric is called TDigest (introduced by Ted Dunning in
Computing Accurate Quantiles using T-Digests).
Boxplot as other percentile aggregations are also non-deterministic. This means you can get slightly different results using the same data.
Implementations§
Source§impl BoxplotAggregation
impl BoxplotAggregation
Sourcepub fn compression<T>(self, compression: T) -> Self
pub fn compression<T>(self, compression: T) -> Self
Approximate algorithms must balance memory utilization with estimation accuracy.
The TDigest algorithm uses a number of “nodes” to approximate percentiles —— the more
nodes available, the higher the accuracy (and large memory footprint) proportional to the
volume of data. The compression
parameter limits the maximum number of nodes to 20 * compression
.
Therefore, by increasing the compression value, you can increase the accuracy of your percentiles at the cost of more memory. Larger compression values also make the algorithm slower since the underlying tree data structure grows in size, resulting in more expensive operations. The default compression value is 100.
A “node” uses roughly 32 bytes of memory, so under worst-case scenarios (large amount of data which arrives sorted and in-order) the default settings will produce a TDigest roughly 64KB in size. In practice data tends to be more random and the TDigest will use less memory.
Trait Implementations§
Source§impl Clone for BoxplotAggregation
impl Clone for BoxplotAggregation
Source§fn clone(&self) -> BoxplotAggregation
fn clone(&self) -> BoxplotAggregation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more