Machine Learning from Scratch 📈
A 100-day hands-on ML journey — daily Jupyter notebooks covering data preprocessing, EDA, feature engineering, outlier detection, PCA, and custom implementations of Linear Regression and SGD from scratch.
78 days complete. Every notebook has theory and working code side by side. No shortcuts — Linear Regression and Stochastic Gradient Descent are implemented from scratch before using scikit-learn.
Table of Contents
What's Covered
The curriculum follows a deliberate progression — get the data right before building models:
Data Loading & Pandas → Encoding → Missing Data Handling
→ Outlier Detection → Feature Engineering → PCA
→ Linear Regression (from scratch) → SGD (from scratch)
→ EDA → Ensemble Methods (upcoming)
Quick Start
git clone https://github.com/Wcoder547/Machine-Learning.git
cd Machine-Learning
pip install -r requirements.txt
jupyter notebook
Open Day-1/ to start from the beginning, or navigate to any day folder for a specific topic.
Daily Breakdown
Phase 1 — Data Foundations (Days 1–10)
| Days |
Topic |
Key Skills |
| Day-1, Day-2 |
ML Introduction |
What ML is, types, workflow overview |
| Day-3, Day-4 |
CSV & Pandas |
Loading data, DataFrame operations, filtering |
| Day-5, Day-6, Day-7 |
Scaling |
Standardization, normalization, ordinal encoding |
| Day-8 |
Encoding |
One-Hot Encoding with Pandas and scikit-learn |
| Day-9 |
ColumnTransformer |
Applying multiple preprocessing steps in a pipeline |
| Day-10 |
Data Refactoring |
Structuring clean preprocessing code |
Phase 2 — Missing Data & Outliers (Days 11–24)
| Days |
Topic |
Key Skills |
| Day-15 |
Date & Time |
Working with datetime features |
| Day-16 |
Case Analysis |
Complete EDA case study |
| Day-18 |
Categorical Missing Data |
Handling missing values in categorical columns |
| Day-19 |
Missing Indicators |
Missing, random, and automatic indicator strategies |
| Day-20 |
KNN Imputation |
Multivariate KNN imputer |
| Day-21 |
Iterative Imputer |
MICE-style iterative imputation |
| Day-22, Day-23 |
Outlier Removal |
IQR method, Z-score |
| Day-24 |
Outlier Detection |
Percentile-based detection |
Phase 3 — Feature Engineering & Dimensionality (Days 25–26)
| Days |
Topic |
Key Skills |
| Day-25 |
Feature Engineering |
Feature construction and splitting |
| Day-26 |
PCA |
Principal Component Analysis, explained variance |
Phase 4 — Algorithms from Scratch (Days 11–14, 27–31)
| Days |
Topic |
Key Skills |
| Day-11 – Day-14 |
Linear Regression |
Custom implementation: cost function, gradient, fit, predict |
| Day-27 |
Linear Regression |
Refinements and edge cases |
| Day-28 – Day-31 |
SGD |
Stochastic Gradient Descent from scratch with visualizations |
EDA
| Folder |
Topic |
EDA-1 |
Exploratory Data Analysis — distributions, correlations |
EDA-2 |
EDA continued |
EDA-3 |
Automated EDA with pandas-profiling |
Featured Implementations
Custom Linear Regression (Day-11 – Day-14, Day-27)
Built from scratch: cost function, partial derivatives, gradient descent loop, predict method — before touching scikit-learn's LinearRegression.
Stochastic Gradient Descent (Day-28 – Day-31)
SGD implemented from scratch with step-by-step visualizations showing how weights update across epochs.
Missing Data Strategies (Day-19 – Day-21)
Three imputation approaches in sequence: simple indicators, KNN imputer, and iterative imputer — with comparison on real data.
Outlier Detection (Day-22 – Day-24)
IQR method, Z-score, and percentile-based detection — each as a standalone, reusable implementation.
Progress
✅ Days 1–31 Complete — preprocessing, feature engineering, Linear Regression, SGD
✅ EDA-1~3 Complete — exploratory analysis with pandas-profiling
🔄 Days 32–44 In progress — ensemble methods
⬜ Days 45–100 Upcoming — classification, advanced models, deployment
78 / 100 days complete (78%)
Resources Included
- 📄
machine-learning-roadmap.pdf — full 100-day curriculum map
- 📚
Notes+Books/ — daily theory PDF notes and reference books
- 📊 Real datasets — placement data CSV used across multiple notebooks
Tech Stack
| Layer |
Technology |
| Language |
Python 3.11+ |
| Notebooks |
Jupyter |
| Data |
NumPy, Pandas |
| ML |
scikit-learn |
| Visualization |
Matplotlib, Seaborn |
About
Most ML courses jump straight to model.fit(). This repo doesn't. Understanding what gradient descent is doing, why imputation strategy matters, and how PCA transforms your feature space makes you a better ML engineer — not just someone who can call scikit-learn APIs.
Building Linear Regression and SGD from scratch before using the library versions is the single most valuable thing in this repo. Once you've written the gradient update loop by hand, the scikit-learn implementation becomes transparent rather than magic.
Built by Waseem Akram — Full-Stack Developer and DevOps Engineer based in Pakistan, working across the MERN stack, Generative AI integrations, and cloud automation.
If this helped you, consider giving it a ⭐