WOLFRAM NOTEBOOK

WOLFRAM|DEMONSTRATIONS PROJECT

Hierarchical Clustering and Heat Maps in Mathematica

x periods
1
2
1
2
3
4
y periods
1
2
1
2
3
4
sampling density
xy noise (σ)
z noise (σ)
row distance
Automatic
column distance
Automatic
row linkage
Automatic
column linkage
Automatic
Hierarchical clustering is a way to expose the hidden structure of a complex, high-dimensional dataset. Heat maps are a common way to visualize the results of such clustering algorithms. This Demonstration shows how to use the HierarchicalClustering package in Mathematica to generate heat maps with the dendrograms included on the sides of the heat map.
Specifically, a sample distribution (pictured on the left) is uniformly sampled with an added noise term (proportional to the
σ
sliders in the
x
-
y
and
z
directions) in an "
x
sampling density" by "
y
sampling density" grid. The resulting matrix of function values is then hierarchically clustered in both the rows and the columns, often revealing a relatively simple underlying structure to the originally complex-structured data. You can vary the noise, the functions used in the hierarchical clustering, and the structure of the underlying distribution being sampled to see how these algorithms are both sensitive to the inputs given and powerful when used properly.
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.