Day 02, Part 1 — Classification Algorithms¶
Most real business problems are classification problems. Will this customer churn? Is this transaction fraud? Does this scan show a tumour? Answering those questions well — and knowing when your model is quietly failing — is the core skill this session builds.
Session Overview
Difficulty: Intermediate Reading time: ~3 hours | Exercises: ~2 hours Prerequisites: Regression Algorithms (Day 01 Part 2) · Probability basics · Train-test split and data leakage · Scikit-learn workflow
Learning Objectives¶
By the end of this session you will be able to:
- Explain what a classifier outputs and how a decision boundary works
- Train and interpret a Logistic Regression, KNN, Naive Bayes, Decision Tree, Random Forest, and Gradient Boosting model
- Choose the right metric for an imbalanced classification problem
- Adjust a decision threshold to favour precision or recall depending on the business cost
- Interpret feature importances from a Random Forest
Session Overview¶
| # | Topic | File | Estimated Time |
|---|---|---|---|
| 1 | Classification Overview | 01-classification-overview.md |
20 min |
| 2 | Logistic Regression | 02-logistic-regression.md |
30 min |
| 3 | KNN and Naive Bayes | 03-knn-and-naive-bayes.md |
25 min |
| 4 | Trees, Forests, and Boosting | 04-trees-forests-boosting.md |
35 min |
| 5 | Classification Metrics | 05-classification-metrics.md |
30 min |
| 6 | Exercises | 06-exercises.md |
45 min |
Total: approximately 3 hours including exercises.
Difficulty: Intermediate. Week 01 Python, NumPy, and Pandas are assumed. Linear algebra and calculus are not required.
Prerequisites¶
Before this session, make sure you can:
- Split a dataset with
train_test_split - Build a basic sklearn
Pipeline - Read a
classification_reportoutput
Tip
If you have not used sklearn before, spend 15 minutes on the sklearn quickstart before opening file 01.
Info
The datasets used in exercises are all built into sklearn (load_breast_cancer, load_iris) or generated with make_classification. No external downloads needed.
Previous: Regression Algorithms | Next: Classification Overview