🧪 06 — Exercises: Classification¶
Exercise 1 — Logistic Regression¶
Use load_breast_cancer().
Tasks:
- split with
stratify=y - train Logistic Regression pipeline
- print accuracy and classification report
Exercise 2 — Compare Models¶
Compare:
- Logistic Regression
- KNN
- Decision Tree
- Random Forest
Exercise 3 — Threshold Tuning¶
Use predicted probabilities and compare thresholds:
- 0.3
- 0.5
- 0.7
Observe precision and recall.
Exercise 4 — Business Interpretation¶
Write which metric matters most for:
- fraud detection
- disease screening
- spam detection