View MNIST (original) (public)

2011-09-14 15:17 by demo | Version 5 | Rating Whole StarWhole StarWhole StarWhole StarWhole Star
Whole StarWhole StarWhole StarWhole StarWhole Star Overall (based on 1 vote)
Whole StarWhole StarWhole StarWhole StarWhole Star Interesting
Whole StarWhole StarWhole StarWhole StarWhole Star Documentation

The MNIST database of handwritten digits

Attribute Types
# Instances: 70000 / # Attributes: 785
HDF5 (52.9 MB) XML CSV ARFF LibSVM Matlab Octave

Files are converted on demand and the process can take up to a minute. Please wait until download begins.

Completeness of this item currently: 100%.
You can edit this item to add more meta information and make use of the site's premium features.
Original Data Format
Version mldata


Data (first 10 data points)
    0.0 0 0 0 0 0 0 0 0 0 ...
    0.0 0 0 0 0 0 0 0 0 0 ...
    0.0 0 0 0 0 0 0 0 0 0 ...
    0.0 0 0 0 0 0 0 0 0 0 ...
    0.0 0 0 0 0 0 0 0 0 0 ...
    0.0 0 0 0 0 0 0 0 0 0 ...
    0.0 0 0 0 0 0 0 0 0 0 ...
    0.0 0 0 0 0 0 0 0 0 0 ...
    0.0 0 0 0 0 0 0 0 0 0 ...
    0.0 0 0 0 0 0 0 0 0 0 ...
    ... ... ... ... ... ... ... ... ... ... ...

The MNIST database of handwritten digits, available from this page, has a training set of 60,000 examples, and a test set of 10,000 examples. It is a subset of a larger set available from NIST. The digits have been size-normalized and centered in a fixed-size image.

  • Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. "Gradient-based learning applied to document recognition." Proceedings of the IEEE, 86(11):2278-2324, November 1998

Data Source
The original black and white (bilevel) images from NIST were size normalized to fit in a 20x20 pixel box while preserving their aspect ratio. The resulting images contain grey levels as a result of the anti-aliasing technique used by the normalization algorithm. the images were centered in a 28x28 image by computing the center of mass of the pixels, and translating the image so as to position this point at the center of the 28x28 field. The MNIST training set is composed of 30,000 patterns from SD-3 and 30,000 patterns from SD-1. Our test set was composed of 5,000 patterns from SD-3 and 5,000 patterns from SD-1. The 60,000 pattern training set contained examples from approximately 250 writers. We made sure that the sets of writers of the training set and test set were disjoint. SD-1 contains 58,527 digit images written by 500 different writers. In contrast to SD-3, where blocks of data from each writer appeared in sequence, the data in SD-1 is scrambled. Writer identities for SD-1 is available and we used this information to unscramble the writers. We then split SD-1 in two: characters written by the first 250 writers went into our new training set. The remaining 250 writers were placed in our test set. Thus we had two sets with nearly 30,000 examples each. The new training set was completed with enough examples from SD-3, starting at pattern # 0, to make a full set of 60,000 training patterns. Similarly, the new test set was completed with SD-3 examples starting at pattern # 35,000 to make a full set with 60,000 test patterns. Only a subset of 10,000 test images (5,000 from SD-1 and 5,000 from SD-3) is available on this site. The full 60,000 sample training set is available.
Measurement Details

The MNIST database was constructed from NIST's Special Database 3 and Special Database 1 which contain binary images of handwritten digits. NIST originally designated SD-3 as their training set and SD-1 as their test set. However, SD-3 is much cleaner and easier to recognize than SD-1. The reason for this can be found on the fact that SD-3 was collected among Census Bureau employees, while SD-1 was collected among high-school students. Drawing sensible conclusions from learning experiments requires that the result be independent of the choice of training set and test among the complete set of samples. Therefore it was necessary to build a new database by mixing NIST's datasets.

Usage Scenario

It is a good database for people who want to try learning techniques and pattern recognition methods on real-world data while spending minimal efforts on preprocessing and formatting.

With some classification methods (particuarly template-based methods, such as SVM and K-nearest neighbors), the error rate improves when the digits are centered by bounding box rather than center of mass. If you do this kind of pre-processing, you should report it in your publications.

revision 1
by sonne on 2010-11-25 14:24
revision 2
by sonne on 2010-11-25 14:29
revision 3
by sonne on 2010-11-25 14:33
revision 4
by demo on 2010-12-03 15:26
revision 5
by demo on 2011-09-14 15:17

No one has posted any comments yet. Perhaps you would like to be the first?

Leave a comment

To post a comment, please sign in.

This item was downloaded 262556 times and viewed 4807 times.

No Tasks yet on dataset MNIST (original)

Submit a new Task for this Data item


Sort by


We are acting in good faith to make datasets submitted for the use of the scientific community available to everybody, but if you are a copyright holder and would like us to remove a dataset please inform us and we will do it as soon as possible.

Data | Task | Method | Challenge


This project is supported by PASCAL (Pattern Analysis, Statistical Modelling and Computational Learning)