MUFID ALNADI

Deep Learning · Flagship

Neural Network from Scratch

A neural network built from the ground up in NumPy — forward pass, loss, and backpropagation by hand — to predict which used cars turn out to be bad buys.

Data — ~73k used-car auction records, 34 features, split in time so the model is always tested on the future.

Reached 0.47 validation Gini with the forward pass, loss, and backpropagation all hand-written in NumPy

Context

The same hard problem as the tabular study — spotting “lemon” used cars before purchase — but solved with a neural network implemented and studied end to end, rather than called from a library.

Approach

  • Built a single-hidden-layer network in NumPy: the forward pass, the binary cross-entropy loss, and the backpropagation — with the gradients checked numerically against finite differences to prove they were right.
  • Trained with mini-batch gradient descent over thirty epochs, watching the loss fall and the validation score climb.
  • Compared activation functions (sigmoid, ReLU, cosine) on the same setup, and kept the train/validation/test split ordered in time.

Result

The network trained smoothly to about 0.47 validation Gini, and the loss and score curves tell a clean convergence story. Among activations, the bounded sigmoid came out ahead of ReLU and cosine.

What it demonstrates

Understanding of how a neural network actually learns — not just how to call one. Deriving and hand-checking backpropagation, then reading the training curves and activation comparison, shows the fundamentals are solid, not borrowed from a framework.

Training loss falling and validation Gini climbing to about 0.47 over thirty epochs.
Training loss falling and validation Gini climbing to about 0.47 over thirty epochs.
Validation Gini by activation function: sigmoid outperforms ReLU, which outperforms cosine.
Validation Gini by activation function: sigmoid outperforms ReLU, which outperforms cosine.
This began as the classical-ML study of the same problem → ← All work