3
$\begingroup$

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.

$\endgroup$
3
$\begingroup$

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])
$\endgroup$
  • 1
    $\begingroup$ 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. $\endgroup$ – Michael Chernick Jun 7 '12 at 11:20
4
$\begingroup$

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).

$\endgroup$
  • $\begingroup$ Yeah, or a glyph plot: scottmcd.net/artanalysis/wp-content/uploads/2010/01/… $\endgroup$ – Theodor Jun 7 '12 at 11:27
  • $\begingroup$ I've never seen a PCP for binary data, do you perhaps have an example? $\endgroup$ – Andy W Jun 7 '12 at 12:14
  • 1
    $\begingroup$ 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. $\endgroup$ – Dmitry Laptev Jun 7 '12 at 13:14
  • $\begingroup$ 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. $\endgroup$ – Andy W Jun 7 '12 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.