Files
lab_classification_features/questions.md
2026-06-08 14:02:37 -04:00

96 lines
2.2 KiB
Markdown

# Spam Classifier: Questions
---
## Checkpoint 1: Exploring the Dataset
**1. How many messages are in the dataset? How many are ham, and how many are spam?**
*Your answer:*
**2. Look at at least ten spam messages (`df[df.label == "spam"]`). List three patterns you notice.**
1.
2.
3.
**3. Look at at least ten ham messages (`df[df.label == "ham"]`). How do they differ from spam?**
*Your answer:*
---
## Checkpoint 2: Manual Classifier
**4. What rules did you write? List each rule and the pattern it targets.**
*Your answer:*
**5. Record your best results:**
| Metric | Value |
|--------|-------|
| Spam precision | |
| Spam recall | |
| Spam F1 | |
**6. Does your classifier make more false positives (ham flagged as spam) or false negatives (spam missed)?**
*Your answer:*
**7. Describe one rule you tried that did not help and explain why.**
*Your answer:*
---
## Checkpoint 3: Designing Features by Hand
**8. List all the features you implemented and the reasoning behind each:**
| Feature name | What it measures | Reasoning |
|-------------|-----------------|-----------|
| | | |
| | | |
| | | |
**9. Record your best results:**
| Metric | Value |
|--------|-------|
| Spam precision | |
| Spam recall | |
| Spam F1 | |
**10. Which features received the largest positive weights (most predictive of spam)? The largest negative weights (predictive of ham)? Does this match your expectations?**
*Your answer:*
**11. Did any feature you thought would help receive a near-zero weight? Why might the model have decided it was unimportant?**
*Your answer:*
---
## Checkpoint 4: Bag of Words
**12. Which transformers did you include in your cleaning pipeline, and in what order? Explain how each one changes the vocabulary.**
*Your answer:*
**13. Record your best results:**
| Metric | Value |
|--------|-------|
| Spam precision | |
| Spam recall | |
| Spam F1 | |
**14. How did the bag-of-words classifier's performance compare to your best hand-designed-features classifier? What do you think accounts for the difference?**
*Your answer:*
**15. Look at the words with the strongest weights (in either direction). Do any surprise you? What do they suggest about how the model is making its decisions?**
*Your answer:*