Visualizing high dimensional binary data

What is a good way to visualize high dimensional (say n=10) binary data? I remember reading something about that a few years ago.

Say for instance, you want to plot / cluster pizzas based on their topping, e.g. ham, chicken, mushrooms etc.

-
add comment

2 Answers

Even if this is binary, you can do a scaled Principal Component Analysis (PCA). By projecting the results on the 2D plane of the first Principal Components you get an idea of the clustering of your data.

In R:

# data is your data.frame/matrix of data
pca <- prcomp(data, scale.=TRUE)
# Screeplot to see how much variance is in the 2D plane
plot(pca)
# Projections
plot(data %*% pca\$rotation[,1:2])
-
High dimensions makes visualization difficult for any variables (continuous or binary). But projections into best separating 2D space should be helpful which is what gui11aume suggests. –  Michael Chernick Jun 7 '12 at 11:20
add comment

Sometimes for binary data Parallel Coordinate Plots can work quite well (you will stil have to play around with it, but it would work much better than with non-binary data).

-
Yeah, or a glyph plot: scottmcd.net/artanalysis/wp-content/uploads/2010/01/… –  Theodor Jun 7 '12 at 11:27
I've never seen a PCP for binary data, do you perhaps have an example? –  Andy W Jun 7 '12 at 12:14
That is probably because they are not so impressive as others :) i.imm.io/rSJo.png The values here are randomized a little to show the number of objects (you can use different line width instead). Even with this toy data you can see some strange clusters and properties (only four objects have features 3 and 4 equal one). Changing the order of the features will give you more interesting results. –  Dmitry Laptev Jun 7 '12 at 13:14
Thanks for the example, one can use some of the same techniques one uses for dense scatterplots in PCP (jittering, making the points/lines smaller, opacity). It still is a mess for overplotting though (though they are often a mess with continuous data as well). An approach that could be used for a similar effect with binary data are ParSets. Robert Kosara has been doing some work recently with PCP plots anyway. IMO some of the interactive brushing and linking modules with PCP are pretty cool, as a static plot though it is more difficult to wade through. –  Andy W Jun 7 '12 at 19:48
add comment