finds.dev← search

// the find

trekhleb/machine-learning-octave

★ 898 · MATLAB · MIT · updated Nov 2025

🤖 MatLab/Octave examples of popular machine learning algorithms with code examples and mathematics being explained

A from-scratch MATLAB/Octave implementation of the classic algorithms from Andrew Ng's Coursera ML course — linear/logistic regression, k-means, anomaly detection, and a small backprop neural network. It's for someone who wants to grind through the math by hand rather than call a library function, not for anyone trying to ship a model.

Every algorithm is hand-rolled (gradient descent, backprop, k-means centroid updates) with no toolbox shortcuts, so you actually see the linear algebra instead of a one-liner. Each folder pairs the code with SVG-rendered formulas using the same variable names as the .m files, so you can map equation to line directly. Demos are runnable out of the box with real datasets (house prices CSV, handwritten digit .mat files) via a single `demo` command — no setup beyond installing Octave.

MATLAB/Octave is a dead-end skill outside coursework; there's no way to take this code into a real project without a rewrite. No tests anywhere — correctness is 'trust the demo output and the charts,' which doesn't scale if someone tweaks the math. The algorithm coverage stopped at the 2011-era Coursera curriculum: no CNNs, no regularized deep nets beyond a toy MLP, nothing resembling how anyone does ML today. It's a static teaching artifact — recent pushes look like doc/formatting tweaks, not new content.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →