Notebooks from working through Andrew Ng's Machine Learning Specialization (DeepLearning.AI) — every function implemented and debugged by hand with NumPy and TensorFlow, not copy-pasted from the official solutions.
Most people run the Coursera notebooks once and move on. I wanted to actually understand what every line does, so each notebook here is rebuilt from scratch — writing the code myself, breaking it, and fixing it. The commit history is left intact on purpose: it's a record of the debugging process, not just the finished product.
- Feature scaling lab: gradient descent was diverging with a learning rate that should've been safe. Turned out one feature column hadn't been scaled before z-score normalization ran on the rest, which badly skewed the cost surface.
- Logistic loss lab: reused the squared-error cost function from Course 1 out of habit. The loss curve looked wrong (non-convex behavior during descent) until I saw why squared error breaks with a sigmoid, and switched to log loss.
- Course 1: Supervised ML — Regression and Classification
- Course 2: Advanced Learning Algorithms
- Course 3: Unsupervised Learning, Recommenders, Reinforcement Learning
- Stack
- Running Locally
- Connect
| # | Notebook | What it covers |
|---|---|---|
| 1 | Cost Function | Implementing the cost function for single-variable linear regression |
| 2 | Gradient Descent | Automating parameter optimization instead of guessing w and b manually |
| 3 | NumPy & Vectorization | Vectors, matrices, indexing, slicing, and the dot product |
| 4 | Multiple Variable Regression | Extending regression to multiple features using np.dot |
| 5 | Feature Scaling & Learning Rate | Why mismatched feature scales break gradient descent, and how z-score normalization fixes it |
| 6 | Feature Engineering & Polynomial Regression | Fitting curves (even a cosine wave) with plain linear regression by engineering polynomial features |
| 7 | Scikit-Learn Gradient Descent | Reproducing the hand-built regression pipeline using scikit-learn's SGDRegressor and StandardScaler |
| 8 | Classification Intro | Contrasting regression vs classification, and why linear regression fails on categorical data |
| 9 | Sigmoid Function | Implementing the sigmoid function and combining it with linear regression to build logistic regression |
| 10 | Decision Boundary | Deriving and plotting the line where a logistic regression model switches its prediction |
| 11 | Logistic Loss | Why squared error breaks with sigmoid, and building the logistic loss function that fixes it |
| 12 | Logistic Cost Function | Full multi-feature logistic regression cost function, comparing two candidate decision boundaries |
| 13 | Gradient Descent for Logistic Regression | Gradient descent for logistic regression, decision boundary visualization, cost function surface |
| 14 | Logistic Regression with Scikit-Learn | Logistic regression using scikit-learn — fit, predict, score |
| 15 | — | Overfitting (interactive Coursera widget lab, no code to rebuild — skipped) |
| 16 | Regularization | Regularized cost and gradient for both linear and logistic regression |
Course 1: Complete.
| # | Notebook | What it covers |
|---|---|---|
| 1 | Neurons and Layers | Building TensorFlow/Keras neurons that mirror Course 1's linear and logistic regression models |
| 2 | Coffee Roasting with TensorFlow | 2-layer neural network in TensorFlow — normalization, compile, fit, weight inspection |
| 3 | Coffee Roasting - NumPy Implementation | Forward propagation built by hand in NumPy — my_dense and my_sequential replicating the TensorFlow model |
| 4 | ReLU Activation | ReLU implemented by hand, plus a 3-layer network with ReLU hidden layers and sigmoid output |
| 5 | Softmax Function | Softmax implemented by hand, plus obvious vs preferred TensorFlow methods for multiclass classification |
| 6 | Multiclass Classification | 4-class neural network with 2 hidden neurons — decision boundaries and softmax/from_logits training |
| 7 | Derivatives | Arithmetic and symbolic derivatives using epsilon and SymPy's diff() |
| 8 | Backpropagation | Chain rule and computation graphs implemented with SymPy — the algorithm behind gradient computation in neural networks |
| 9 | Model Evaluation and Selection | Train/CV/test split, polynomial degree selection via CV MSE, and final unbiased test evaluation |
| 10 | Diagnosing Bias and Variance | Diagnosing high bias vs high variance using train/CV error against a baseline, fixing each via polynomial degree and regularization |
| 11 | Decision Trees | Entropy and information gain computed from scratch to select the best splitting feature for a decision tree |
| 12 | Tree Ensemble | One-hot encoding with pandas, then decision tree, random forest and XGBoost with scikit-learn, including hyperparameter plots and early stopping |
Course 2: Complete.
In progress — notebooks will be added here as I work through the course.
Python · NumPy · pandas · Matplotlib · Jupyter Notebook · scikit-learn · XGBoost · TensorFlow · Keras
git clone https://github.com/Abdullahjaved-82/ml-specialization-notes.git
cd ml-specialization-notes
jupyter notebookThese are my own implementations of concepts taught in the course, not copies of the official solutions.
- LinkedIn: linkedin.com/in/abdullah-javed-8468a7343
- Portfolio: abdullahjaved.site
- Email: abdullahjavec@gmail.com