liveBook · Manning

Reduction operation

As explained in Advanced Algorithms and Data Structures

A reduce operation combines intermediate information from a homogeneous group of entries to produce a result.

A reduction operation combines intermediate information from a homogeneous group of entries into a result. In MapReduce, mappers extract information and reducers receive entries grouped by category or key. section 13.2.2

A reducer can perform different work on each group:

  • Count coin occurrences, sum their values, or filter entries. section 13.2.2
  • In k-means, compute each cluster’s center of mass to update its centroid. section 13.3
$100: 1
50¢: 1
$100: 1
$1: 1
25¢: 1
...

See sample mapper output listing coin occurrences before reduction. section 13.2.2

Grouping lets reducers work on separate categories. In canopy clustering, filtering centroids during reduction can leave some points outside every canopy, so the reducer’s role may affect coverage. section 13.2.2 section 13.3.3

How Advanced Algorithms and Data Structures covers it

How deep it goes
Defines reduction and illustrates counting, summing, filtering, and cluster-center calculation, without specifying a general reducer implementation.
Examples
Uses coin-occurrence counts and k-means cluster-center updates as concrete reductions.
What it assumes
Assumes intermediate data can be grouped into homogeneous entries and briefly explains the preceding map stage.
What you can do after
Apply reduction by grouping intermediate entries by category and combining each group into a result.
How it connects
Connects reduction to MapReduce, mapping, combiners, and k-means clustering.

Also explained in

Compare how 9 books explain reduction operation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Advanced Algorithms and Data Structures. The section links point to the parts of the book it draws on.