In this post, we will be looking into one of the most well-known Data Science challenges: the MNIST - Digit Recognizer and a solution with Convolution Neural Network model.
Note: The source codes as well as original datasets for this series will also be updated at this Github repository of mine.
First and foremost, don’t be scared by the term Neural Network - it is actually easier to use than you might think. Nowadays, you can build your own neural network model by any of these open-source libraries with Python:
For the purpose of this blog, I’m going to use Scikit Neural Network, simply because it’s very similar to using Scikit-learn library.
To install Scikit Neural Network, you need python and pip ready:
Building Neural Network Model
Scikit Neural Network Classifier pretty much can be used the same way as any other Scikit-Learn’s classifier.
Define your model
Below is how you create a Neural Network model with 3 Convolutional Layers, 1 Rectifier Layer, and 1 Softmax Loss Layer:
Training and Evaluation
Output:
Note:
Even though we only used 1000 data points (comparing to 42000 datapoints from the real training dataset), we already achieved 88.94% accuracy score.
A full implementation of this solution can achieve 98.71% accuracy score (top 10%).