15.8 Exploring clusters

In the example with the companies, there were few enough records that I could see the labels on the visualization itself. When you have lots of records, it can be impossible to identify individual records.

But do you need to?

One of the goals is to identify if there are clusters of individuals. Then if there are, you may (or may not) be interested in identifying what makes the clusters similar. If you’re really interested in the characteristics in individuals being close to each other you can use existing plotting techniques that we’ve used for bivarate plots, and for PCA.

Cluster analysis is an exploratory technique. We can use some existing summary tools to explore what the groups, or clusters, are like.

15.8.1 Univariate distribution of clusters

What’s the distribution of clusters? This could be answered with a a table or barchart.

15.8.2 Bivariate plots

If you have some variables of interest that you think might be contributing to your clustering, create a bivariate plot of those measures against cluster.

If you want to see how the clusters vary across two or more dimensions, you could create scatterplots

15.8.3 Multivariate plots

or scatterplot matrices. This one lets me see that PE does a good job of separating out group 1, and possibly ROR5 pulls out group 3.

or heatmaps,

Note that this plot is almost identical to when we visualized the distance matrix d using the fviz_dist function in 14.3.2. That’s what the colors are, is the distances. The difference here is that the rows (and columns) are ordered according to their cluster (with the dendogram on the left.)

15.8.4 Still too many records / variables

So take a sample.

  • Filter on just one cluster and l👀k at your data.
  • Select groups of variables that hang together well as shown by PCA and only cluster on those.
  • Select groups of variables that mean something scientifically, or that you want to know if they are meaningful contributions to clusters.