liveBook · Manning

Heat map

As explained in Outlier Detection in Python

A color-encoded matrix visualization representing values for combinations of two categorical or numeric dimensions.

A heat map is a color-encoded matrix that represents values for combinations of two dimensions. For two categorical features, each cell shows the count or proportion associated with a pair of category values, making unusually sparse or comparatively low combinations visible. section 2.3.2

Use heat maps as an exploratory view of categorical relationships and potential outliers:

  • Compare the cells across category pairs to find non-zero combinations that are low relative to the others. section 2.3.2
  • Use the display as a first step in outlier detection, after checking the data through exploratory analysis for errors. section 2.3.2
  • Treat the pattern as evidence for further investigation rather than a complete detector: heat maps work well for one or two categorical features but do not explain higher-dimensional outliers. section 2.3.2 section 8.1.2
Figure 2.15 Examples of visualization for two-dimensions, with two categorical features (left) and one categorical and one numeric feature (right)

Compare the categorical-pair heat map with a boxplot for a mixed categorical and numeric pair; the contrast clarifies why each plot suits a different feature combination. section 2.3.2

How Outlier Detection in Python covers it

How deep it goes
Defines cell-based comparison and interpretation, but stops short of explaining implementation or higher-dimensional detection.
Examples
Uses eucalyptus category pairs and outlier-proportion heat maps to illustrate sparse combinations and categorical anomalies.
What it assumes
Assumes categorical-feature data and basic exploratory analysis, while emphasizing data-error checks before interpretation.
What you can do after
Evaluate categorical combinations visually and identify candidates for further outlier investigation.
How it connects
Connects heat maps with exploratory data analysis, outlier detection, boxplots, and categorical-feature comparisons.

Also explained in

Compare how 7 books explain heat map →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Outlier Detection in Python. The section links point to the parts of the book it draws on.