‖β‖₁ — add up the sizes
Lesson 0015 · Homework 1, Problem 4
Regularization can prefer a shortcut
Sage already has two fitted candidates for flagging walkways. Same features, same task — but the penalty she adds decides which one ships, before either touches a new photo.
Problem 4(a)–(b)
Two candidates. One penalty. Different verdicts.
Candidate A concentrates weight on two features and zeroes the rest. Candidate B spreads the same total weight across all four. ‖β‖₁ can't tell them apart — ‖β‖₂² can.
Do not mix these up
Add the sizes. Or square them first.
‖β‖₂² — square first, then add
How this dataset is built
A photo becomes training data once a human confirms it.
Sage's four features come straight off a walkway photo — nothing about whether the walkway actually needed review. That part is added afterward, once a reviewer checks.
One photo, just collected
After a reviewer checks
A new photo, scored by the chosen model
Problem 4(a)–(b), worked
Same total size. Different penalty. Different winner.
A = (1.50, 0, 1.50, 0), loss 0.30. B = (0.75, 0.75, 0.75, 0.75), loss 0.34. λ = 0.05.
Norms
‖β‖₁ ties exactly. ‖β‖₂² does not — B's spread-out weight costs less once squared.
Regularized objective, λ = 0.05
L1: A wins (tie on penalty, so raw loss decides).
L2: B wins (the penalty itself flips the verdict).
Problem 4(c)
A zero coefficient is a fact about this fit — not about the world.
Problem 4(d)
One camera was mostly used after storms.
The camera-border feature isn't measuring obstruction — it's measuring which camera took the photo, which happens to correlate with storm damage. An overall accuracy number can't see this.