Digit Classification using Deep Learning

Context: Digitizing handwritten records remains a challenge for many organizations and makes archiving unnecessary cumbersome. This barrier can be overcome by applying machine learning to more easily extract insights.

Objective: In 1999, the Modified National Institute of Standards and Technology (MNIST) released handwritten images serving as the benchmark for digit classification algorithms. Hence, we want to automatically detect digits 0 through 9.

Data Source: https://www.kaggle.com/competitions/digit-recognizer/data

Each image is 28 x 28 pixels with each pixel having a value of 0-255 inclusive denoting its lightness or darkness.

Training Analysis: Using Keras, we applied a convolutional neural network (CNN) algorithm to assign learnable weights and biases to various objects in the pixelated image. We applied batch normalization to expedite training. Most importantly, we selected to use the dropout regularization method to force the net to learn features in a distributed way, not relying too much on a particular weight, to improve its generalization.

We visualized loss to ensure we identified a good set of weights and biases to train our model across all samples. If the model's prediction is perfect, the loss is zero; otherwise, the loss is greater.

The loss is calculated on training and validation; loss value implies how poorly or well a model behaves after each iteration of optimization.

Conclusion: We were able to successfully classify digits and obtained training and testing accuracies of > 99%.