NumPy ML

NumPy ML

โ˜… 4.2 ๐Ÿ”– 4000 saves ๐Ÿ’ฐ Free GitHub

NumPy ML (numpy-ml) is a collection of machine learning algorithms implemented exclusively in NumPy: deliberately inefficient but highly legible code that shows exactly how each algorithm works. Where frameworks like PyTorch hide the math behind optimized kernels, numpy-ml spells it out, from neural networks (including RNNs, LSTMs, VAEs and WGAN-GP) to classical methods such as gradient boosting, Gaussian mixture models, hidden Markov models and Gaussian processes, plus reinforcement learning agents and NLP models like word2vec. The project has more than 16,000 stars on GitHub.

Overview

The library is built for learning and prototyping. You can install it from PyPI, clone it as a starting point for experiments, and read each model end to end because everything is plain NumPy with documented equations. Coverage is broad: supervised and unsupervised learning, topic models, attention mechanisms, tree ensembles, kernel methods and RL agents that train on OpenAI Gym environments. Full documentation lives on Read the Docs, with per-model details. The codebase was last updated in 2023, so treat it as a stable educational reference rather than a fast-moving framework, but for understanding the internals of ML algorithms it remains one of the clearest resources available.

Key Features

  • Machine learning algorithms implemented purely in NumPy for maximum readability
  • Neural networks including RNNs, LSTMs, VAEs, GAN variants and attention mechanisms
  • Classical ML: gradient boosting, random forests, k-NN, Gaussian processes, GMMs and HMMs
  • Reinforcement learning agents trainable on OpenAI Gym environments
  • NLP models such as word2vec and topic models, all installable from PyPI
  • Thorough documentation on Read the Docs explaining each model

๐Ÿ’ณ Pricing

NumPy ML is completely free and open source under the GPL-3.0 license. There are no paid tiers.

Who Is It For

NumPy ML is for students, self-taught ML engineers and researchers who want to understand algorithms from the inside, and for anyone prototyping an idea who prefers transparent code they can modify line by line.

๐Ÿš€ Visit NumPy ML Official Site

๐Ÿšฉ Report an issue