← David Lorow
Deep Dive

ML

Built a complete machine learning pipeline in Python to train a linear classifier on the MNIST dataset, applying fundamental ML concepts including cross-entropy loss, backpropagation, and the bias-variance tradeoff. The model reached 90% test accuracy. Used PyTorch for model architecture and training, managing DataLoaders and implementing L2 regularization via weight decay. Ran a greedy 1D hyperparameter search across learning rate, weight decay, and batch size. Applied GPU acceleration (CUDA / Apple Silicon MPS), fixed-seed reproducibility, and a proper train/validation/test split. Visualized results with Matplotlib and Seaborn, documenting the full math from logit computation to the SGD weight-update rule in a Jupyter Notebook.

PyTorch CUDA / MPS Matplotlib Python
Predictions

Model-predicted labels for a sample of test digits, versus their true labels.

Sample MNIST predictions vs true labels
Confusion Matrix

The model held around 90% accuracy across runs of the full notebook, with small run-to-run deviations visible in the heatmap.

Confusion matrix for the MNIST classifier