This repository teaches machine learning from first principles using Python.
Starting with foundational mathematics (derivatives, exp/log, probability), each notebook builds complete understanding before exploring modern tools like Scikit-learn and PyTorch. All mathematical concepts are derived step-by-step, making the content accessible to anyone with basic high school calculus knowledge.
This aims to be part of a broader machine learning series, with companion repositories for unsupervised, reinforcement and other state-of-the-art machine learning domains in development.
🚀 Quick Start: Run notebooks directly in your browser - no setup required!
- Click any "Open in Colab" button below
- In Colab: Click "Connect" (top-right)
- Click "Runtime" > "Run all" (top menu)
Theory & from-scratch implementation of logistic regression using the Wisconsin Breast Cancer dataset.
Production-grade PyTorch implementation with modern ML engineering practices.
Deep dive into decision tree theory with a complete from-scratch implementation.
Real-world prediction of London housing market prices with Scikit-learn, random forests and XGBoost.
Automated Tree Learning Analysis System (ATLAS) for feature engineering and model comparison.
Implementation of neural networks and deep learning fundamentals.
- Binary classification task
- 569 samples × 30 features
- Medical diagnosis application
- Regression problem
- 3,479 samples × 9 features
- Geographic feature encoding
For those who prefer to run notebooks locally:
git clone https://github.com/powell-clark/supervised-machine-learning.git
cd supervised-machine-learning
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Copyright © 2025 Powell-Clark Limited
Licensed under the Apache License, Version 2.0
We welcome community contributions to improve these educational materials! Here's how you can help:
- Spot a typo or unclear explanation? Open a pull request
- Have an idea for improvement? Create an issue
- Want to add new examples or exercises? We'd love to see them
- Found a bug in the code? Let us know
Contributors will be acknowledged in our CONTRIBUTORS.md file which will be created with our first contribution.
If you use these materials in your work, please cite as:
Powell-Clark (2025). Supervised Machine Learning from First Principles.
GitHub: https://github.com/powell-clark/supervised-machine-learning
Questions or feedback? Contact [email protected]