Comparative Analysis of Classical Machine Learning and Deep Learning Architectures for Handwritten Digit Classification
Handwritten digit recognition remains a core problem in computer vision, with both classical machine learning (ML) and deep learning (DL) models widely applied but rarely compared under identical conditions. This study presents a controlled evaluation of Logistic Regression, Support Vector Machine (SVM), Convolutional Neural Network (CNN), Long Short-Term
Memory (LSTM), and a hybrid CNN–LSTM using the MNIST dataset. Data were normalized, reshaped, and encoded within a reproducible Python pipeline executed in a CPU-only environment. Classical models used flattened inputs, while DL models leveraged spatial
structure. Results show a clear progression in performance: Logistic Regression (92.00%),
SVM (97.59%), LSTM (98.53%), and CNN/CNN–LSTM (98.96%). CNN achieved the best overall metrics (precision 0.9897, recall 0.9896, F1-score 0.9896, AUC 0.999926) with
225,034 parameters, a training time of 209.77 seconds, and an inference time of 2.32
milliseconds. Statistical analysis confirmed CNN’s superiority. The findings demonstrate that
architectures aligned with data structure, particularly CNNs exploiting spatial locality, deliver
optimal performance. While classical models remain competitive, their reliance on flattened
representations limits effectiveness. The near-ceiling MNIST results further suggest the need
for more challenging benchmarks to distinguish advanced models.