finds.dev

trekhleb/machine-learning-octave

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

View on GitHub

★ 898MATLABMITupdated Nov 2025

// the take

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.

We read the README, the directory tree and a key source file in September 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
898
Forks
250
Language
MATLAB
License
MIT
Last commit
23 Nov 2025

// nearby

If machine-learning-octave isn't quite it.

All repos →