Machine Learning · beginner
Logistic Regression From Scratch in Python (NumPy Tutorial)
Build logistic regression with NumPy in about 30 lines (sigmoid, cross-entropy, gradients, training loop) and verify it matches scikit-learn exactly.
THE INFERENCEAI BLOG
Tutorials, roadmaps and career guides for university students in the US, UK, Canada, Europe and beyond. Every guide explains the idea, shows tested Python code, and links to a problem you can solve.
Machine Learning · beginner
Build logistic regression with NumPy in about 30 lines (sigmoid, cross-entropy, gradients, training loop) and verify it matches scikit-learn exactly.
ML Coding & NumPy · beginner
Three rules, a few patterns, and the silent bugs to watch for. Replace slow Python loops with clean, vectorised NumPy.
Generative AI · intermediate
Build the attention mechanism behind every transformer in plain NumPy: queries, keys, values, the √d scaling, causal masks and multi-head attention.
Deep Learning · intermediate
Write gradient descent, momentum, RMSProp and Adam from scratch, see what each one fixes, and finally understand Adam's bias correction.
Mathematics for AI · intermediate
Why naive softmax turns your loss into NaN, how subtracting the max fixes it, and how to write a cross-entropy loss that can't blow up.
ML Coding & NumPy · beginner
The textbook sigmoid prints overflow warnings on extreme inputs. Learn the stable, vectorised version, its gradient, and where sigmoid still belongs.