Stage 1
Stage 1: Foundations
Goal: Set up Python for AI, learn the maths you actually need, and train your first models from scratch. Time: ~2 weeks at 30–60 minutes a day.
By the end of this stage you can:
- Write fast, vectorized NumPy code
- Explain vectors, dot products, gradients and softmax — and compute them
- Load, clean and split data without leaking the test set
- Build linear and logistic regression from scratch with gradient descent
How to study
- Read one part at a time, in order.
- Run every example yourself (
python examples/01_....py). The output in the lesson came from a real run; yours should match. - Do the exercises before looking at the solutions.
- Finish the mini-project at the end of each part, then the stage project.
Parts
| Part | Area | You will build | Time |
|---|---|---|---|
| 1 | Python for AI | Array drills: five loops rewritten as vectorized NumPy, timed | ~2 h |
| 2 | The maths you need | Cosine, softmax and a gradient checker, each tested in code | ~3 h |
| 3 | Working with data | A churn data report with the baseline every model must beat | ~2.5 h |
| 4 | Your first models | A from-scratch churn classifier that beats the baseline | ~3 h |
Stage project
Churn predictor from scratch — logistic regression in NumPy on the churn data, with a decision threshold and a comparison against the majority-class baseline.
The practice data
Most examples use a synthetic customer-churn table from tools/ailab.py. It is generated locally with a fixed seed: 2,000 customers, their tenure, monthly charges, support calls, contract type — and whether they churned. Every learner sees exactly the same numbers.