Building a Neural Network from Scratch: the Math and the Code

Introduction When I took Machine Learning in College, I never felt that online resources described the mathematical foundations to my tastes. To try and fix this, in this post I’ll explore the mathematical foundations underlying neural networks and walk through my from-scratch implementation for binary classification on the moons dataset. We’ll dive deep into the calculus, linear algebra, and optimization theory that makes these models work, culminating in a network that achieves 99.6% accuracy on the moons dataset. ...

03 May 2025 · 7 min · 1286 words