Associative Operations for Combining Summaries

An associative operation lets adjacent inputs be regrouped without changing the result, so partitions can often be summarized separately.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Combine two chunks
  2. Preserve needed weights

Combine two chunks

Counts for two groups of observations add. With three chunks, adding the first two before the third gives the same exact total as adding the last two first. See left and right folds.

Preserve needed weights

Average alone cannot represent a chunk for an unweighted combine. A pair holding sum and count can combine by componentwise addition and divide afterward. Returning related values explains why both fields belong together.[1]

References

  1. Python Software Foundation, Functional Programming HOWTO ↩