Struct elasticsearch_dsl::search::aggregations::metrics::BoxplotAggregation
source · [−]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
sourceimpl BoxplotAggregation
impl BoxplotAggregation
sourcepub fn compression(self, compression: impl Into<Number>) -> Self
pub fn compression(self, compression: impl Into<Number>) -> 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
sourceimpl Clone for BoxplotAggregation
impl Clone for BoxplotAggregation
sourcefn clone(&self) -> BoxplotAggregation
fn clone(&self) -> BoxplotAggregation
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for BoxplotAggregation
impl Debug for BoxplotAggregation
sourceimpl PartialEq<BoxplotAggregation> for BoxplotAggregation
impl PartialEq<BoxplotAggregation> for BoxplotAggregation
sourcefn eq(&self, other: &BoxplotAggregation) -> bool
fn eq(&self, other: &BoxplotAggregation) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &BoxplotAggregation) -> bool
fn ne(&self, other: &BoxplotAggregation) -> bool
This method tests for !=
.
sourceimpl Serialize for BoxplotAggregation
impl Serialize for BoxplotAggregation
impl StructuralPartialEq for BoxplotAggregation
Auto Trait Implementations
impl RefUnwindSafe for BoxplotAggregation
impl Send for BoxplotAggregation
impl Sync for BoxplotAggregation
impl Unpin for BoxplotAggregation
impl UnwindSafe for BoxplotAggregation
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more