Please write any digit from 0 to 9 into the box

Please write your digits in American English style, as the training set is originated from the US.
Have a look at this subset of training data for examples

Method Prediction Confidence
- - -
- - -
Line width : Color :

Architecture

1. Convolutional network

coming soon!

2. Fully connected network

The neural network has 3 layers: 1 input, 1 output and 1 hidden layer. The hidden layer contains 300 units, the input layer has units for each pixel and we have ten output units, one for each digit. Neural network

Training Algorithms

1. Convolutional network

coming soon!

2. Fully connected network

The training was performed by me using Octave programming language and the backpropagation algorithm.

The cost function is the generalization of logistic regression. The cost function includes regularization in order to keep the weights small and thus generalize the model more.

With backpropagation we are able to calculate the partial derivative of the cost function on every weight. When the optimalization algorithm is fed with both the cost function and its derivatives, it can minimize the cost function using gradient descent.

Both the backpropagation and the cost function is my implementation in Octave. The optimalization algorithm (fmincg) is based upon Andrew Ng's Coursera class: Machine Learning.

Prediction Algorithms

1. Convolutional network

coming soon!

2. Fully connected network
The prediction algorithm is a Java service hosted in Google Cloud Platform. After having the weights for each unit, the prediction is an implementation of forward propagation which is basically only matrix multiplication and the sigmoid function applied. I did not use any ML library for this, the Apache Commons Math was enough.

Training set

The neural network was trained using the MNIST database using 60000 examples. The training set is visualised here

GitHub

Source code available at https://github.com/kavai77/handwriting

Author

Csaba Kavai Linked profile