Blog

Articles

Long-form, code-first writing on machine learning — from gradient descent from scratch to shipping RAG systems in production.

Algorithms From Scratch·Mar 10, 2026

How to Load Machine Learning Data From Scratch In Python

Before you train a model, you have to load data. Read CSVs, convert types and encode labels with nothing but the standard library. Runnable in your browser.

Suresh Madhra
7 min read
Algorithms From Scratch·Mar 03, 2026

How to Scale Machine Learning Data From Scratch With Python

Many ML algorithms expect data on a common ruler. Implement normalization and standardization from scratch, avoid leakage, and know which one each algorithm wants. Runnable in your browser.

Suresh Madhra
8 min read
Algorithms From Scratch·Feb 24, 2026

How to Implement Resampling Methods From Scratch In Python

Estimate how your model will perform on unseen data. Implement train/test splits, k-fold, stratified folds and the bootstrap from scratch. Runnable in your browser.

Suresh Madhra
11 min read
Algorithms From Scratch·Feb 17, 2026

How To Implement Machine Learning Metrics From Scratch in Python

Once you make predictions, you need to know if they are any good. Implement accuracy, the confusion matrix, MAE, RMSE and R² from scratch — and learn which to trust when. Runnable in your browser.

Suresh Madhra
9 min read
Algorithms From Scratch·Feb 10, 2026

How To Create an Algorithm Test Harness From Scratch With Python

We cannot know which algorithm will be best for a given problem. Build a reusable train/test and cross-validation harness that compares algorithms fairly. Runnable in your browser.

Suresh Madhra
9 min read
Algorithms From Scratch·Aug 13, 2025

How to Implement Linear Regression From Scratch in Python

The core of many ML algorithms is optimization. Implement stochastic gradient descent from scratch and use it to fit a linear regression model.

Suresh Madhra
12 min read