trekhleb/homemade-machine-learning
🤖 Python examples of popular machine learning algorithms with interactive Jupyter demos and math being explained
Implements algorithms from scratch using NumPy and mathematical principles rather than high-level ML libraries, with each algorithm accompanied by detailed mathematical derivations and proofs. Includes runnable Jupyter notebooks for regression, classification, clustering, anomaly detection, and neural networks that visualize training dynamics and allow parameter experimentation directly in the browser via Binder. Structured to teach foundational concepts through code rather than serve as production-ready implementations.
24,300 stars.
Stars
24,300
Forks
4,163
Language
Jupyter Notebook
License
MIT
Category
Last pushed
Nov 23, 2025
Commits (30d)
0
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/ml-frameworks/trekhleb/homemade-machine-learning"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Related frameworks
numerai/example-scripts
A collection of scripts and notebooks to help you get started quickly.
musicinformationretrieval/musicinformationretrieval.com
Instructional notebooks on music information retrieval.
Arm-Examples/ML-examples
Arm Machine Learning tutorials and examples
akabe/ocaml-jupyter
An OCaml kernel for Jupyter (IPython) notebook
lazyprogrammer/machine_learning_examples
A collection of machine learning examples and tutorials.