In reply to Alex Robinson.

Like all dimension reduction methods, there are limitations. The idea of dimension reduction postulates that a high-dimensional space of p features (here, p=12 flavors) can be represented by projecting the data onto a linear plane that has k dimensions, where k is smaller than p. In practice, this is often approximately true for correlated variables. But it is never guaranteed.

Also, I omitted an important step: How do you choose k? Here I used k=4, but the best value to choose depends on the correlations between the original variables. Sometimes, choosing k is more of an educated guess than an exact science. There is always a trade-off. Larger values of k represent the data better, but are more difficult to interpret.