Skip to content

bottomk-others-avg

Input Stack:
k: Int
stat: String
expr: TimeSeriesExpr
Output Stack:
TimeSeriesExpr
 
 

Select the bottom K time series based on a summary statistic and include an average aggregate of all other excluded series. This combines :bottomk with an additional "others" series showing the average of the time series that were not in the bottom K.

Parameters

  • expr: The grouped time series expression to select from
  • stat: The summary statistic to rank by (max, min, avg, count, total, last)
  • k: Number of lowest-ranking series to keep (positive integer)

Behavior

  1. Selection: Performs the same selection as :bottomk
  2. Aggregation: Computes the average of all remaining (excluded) time series
  3. Output: Returns the bottom K series plus one additional "others" series

Examples

Bottom 2 clusters with average of the rest:

BeforeAfter
name,sps,:eq,
(,nf.cluster,),:by
name,sps,:eq,
(,nf.cluster,),:by,
max,2,:bottomk-others-avg

Since: 1.7