Hacked together very quickly by @karpathy.

Fake, low-budget console:

Loading MNIST and drawing some of the digits.... (give it a few seconds).

Javascript MNIST

this will use my forestjs Javascript library to classify a digit
of MNIST. You can also use SVM! In that case uses my SMO SVM implementation in svmjs

By default the forest uses 100 trees with depth 9. Uses only 10,000/60,000 of MNIST examples to save data loading bandwidth on my server. See below for more info.






Browser not supported for Canvas. Get a real browser.

Hit CTRL+U (or view Source from menu) to see the magic. I'd like to clean this up a bit soon. Basically what happens:
1. 10 .zip files (total ~2MB) are downloaded from my website that contain digits in .csv files. Currently this is using test set of MNIST because I'm afraid of too much traffic from people downloading the full sets. If you plan to do a lot of your own hacking on this, please explicitly host the .zip files on your own server to not place too large of a load on our servers. I can point you to the train files as well.
2. digits are visualized using Canvas HTML5 element above, using my notpygamejs library. (Just Canvas convenience wrapper)
3. forestjs is used to train a Random Forest detects digit 4. (can be changed to SVM through buttons)
4. precision-recall curve is made and Average Precision is computed as done in Pascal VOC. This is what is printed in console. High is good!
5. ???
6. profit!

Random Forests are awesome! To get intuition about how they work: Random Forests online demo
For more thorough treatment, see this Microsoft paper
To get intuition on SVMs see this online demo: svm online demo
And for more mathematical treatment see Andrew Ng's notes: SVMs