Files
lab_classification_features/questions.md
Chris Proctor aaf5b17ad8 Initial commit
2026-06-06 21:36:59 -04:00

123 lines
2.8 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: Data Cleaning
**8. Which transformers did you add to the pipeline, and in what order?**
*Your answer:*
**9. Did any transformer hurt performance? Why might cleaning sometimes make things worse?**
*Your answer:*
**10. If you removed the lowercasing from your `predict_one` method now that the pipeline handles it, would your results change?**
*Your answer:*
---
## Checkpoint 4: Feature Engineering
**11. List all the features you implemented and the reasoning behind each:**
| Feature name | What it measures | Reasoning |
|-------------|-----------------|-----------|
| | | |
| | | |
| | | |
**12. Record your best results:**
| Metric | Value |
|--------|-------|
| Spam precision | |
| Spam recall | |
| Spam F1 | |
**13. Which features received the largest positive weights (most predictive of spam)?**
*Your answer:*
**14. Which features received near-zero weights? Why might the model have ignored them?**
*Your answer:*
---
## Final Questions
**15. Pick a different classification problem (for example: positive vs. negative movie reviews,
news articles vs. opinion pieces, or medical vs. general-audience text).
Propose five features you would extract to classify it, and explain your reasoning.**
Problem I chose:
| Feature name | What it measures | Why it might help |
|-------------|-----------------|------------------|
| | | |
| | | |
| | | |
| | | |
| | | |
**16. Could adding more features ever *hurt* the performance of a classifier? Explain
when and why this might happen.**
*Your answer:*
**17. It would be possible to make every word in the vocabulary a feature, where each
feature indicates whether that word appears in the message. Explain how this could
be implemented. Do you think it would work well? What are the trade-offs?**
*Your answer:*
**18. In this lab you split the data into 70% training and 30% testing. What would happen
if you used 99% for training and 1% for testing? What about 1% for training and 99%
for testing?**
*Your answer:*