For the past few months I have been tackling the classic machine learning problem of classifying handwritten digits. As all nerds do I really enjoy visualizations of data. Here are two that I thought would be fun to share!
Visualizing handwritten digits:
![]() |
| Figure 1: Axes Determined by Principal Components of 0 |
![]() |
| Figure 2: Axes Determined by Principal Components of 1 |
![]() |
| Figure 3: Axes Determined by Principal Components of 0 and 1 |
Assuming that these scatter plots came from the same handwritten digit examples, which they did, you might be wondering about two things. First, how can one create a 3 dimensional scatter plot of what is originally a 784 dimensional vector and second how could you possibly end up with two different scatter plots from the same examples?
The answer to the first question is that these are scatter plots of the first three principal components of the handwritten digits. This is also the key to the second answer. Two different scatter plots may be obtained because the principal components used are different, in the first figure the digits are plotted against the first three principal components of the 0's and in the second figure the digits are plotted against the first three principal components of the 1's.
I think I am going to try to make the scatter plots interactive by
embedding a python script using Brython, but I've never used Brython and it supports Python 3 while up to date I have been using Python 2.7, so I'll have quite a bit of learning to do to make that happen!



No comments:
Post a Comment