← all repositories
rougier/ML-Recipes

Classic ML algorithms, served à la carte

A repo that treats machine learning like a cookbook: each algorithm is a single, self-contained Python file you can run and tweak.

686 stars Python Learning
ML-Recipes
Velocity · 7d
+0.3
★ / day
Trend
steady
star history

What it does

ML-Recipes is a curated set of standalone Python scripts implementing foundational machine learning algorithms. No frameworks, no dependencies, no notebooks—just one file per technique, ready to run. The collection spans multi-armed bandits, neural networks (from perceptrons to LSTMs), Markov decision processes, and dimensionality reduction methods. Each recipe includes a citation to the original paper, which feels almost quaint in the age of arXiv preprints.

The interesting bit

The pedagogical restraint. The author, Nicolas Rougier, deliberately keeps each example small and self-contained, making this closer to a well-organized set of lecture notes than a production library. The xkcd comic about machine learning hype in the README sets the tone: this is for understanding, not for deploying.

Key highlights

  • 15+ algorithms across four categories: bandits, neural nets, MDPs, and dimensionality reduction
  • Each file is standalone Python with no external dependencies
  • Every recipe cites the original research paper, often going back to the 1950s–1990s
  • Includes somewhat niche entries like Adaptive Resonance Theory and Echo State Networks alongside the usual suspects
  • Explicitly welcomes small, focused contributions

Caveats

  • No continuous integration, testing, or stated Python version requirements visible in the README
  • The “run to see usage and result” instruction is vague—no sample outputs or expected behavior shown
  • LSTM recipe links to an external repo rather than being self-contained like the others

Verdict

Worth bookmarking if you’re teaching ML, interviewing, or just tired of reverse-engineering PyTorch to understand how a perceptron works. Skip it if you need battle-tested implementations or GPU acceleration.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.