DS701 Session 9 — Mon Oct 5, 2026 · quiz is Wed Oct 7
Lectures 01–07
Not on Quiz 1
sklearn callsCalibration: the problems are at the level of HW1–HW4 plus the bias–variance problem coming in HW5. Fresh scenarios, fresh numbers.
Five problems, 20 points each:
Partial credit is real: a correct setup with an arithmetic slip earns most of the points. A bare number with no work earns few.
Q1. Why is \(1 - \cos(\mathbf x, \mathbf y)\) not a metric? Which axiom fails?
→ Triangle inequality — and \(d(\mathbf x, 2\mathbf x) = 0\), so “\(d=0 \iff\) equal” fails too.
Q2. As \(p \to \infty\), which coordinate dominates \(\|\mathbf x - \mathbf y\|_p\)?
→ The single largest \(|x_i - y_i|\) (Chebyshev).
Q3. When would you prefer Jaccard over Hamming for two bit vectors?
→ When the sets differ a lot in size — Jaccard normalizes by the union.
Q4. One feature is in dollars, another in years. What do you do before computing Euclidean distance, and why?
→ Standardize; otherwise the large-range feature dominates.
Q5. Across Lloyd iterations, can the \(k\)-means objective ever go up?
→ No. Each step (assign, update) can only lower WCSS — but it stops at a local minimum, hence \(k\)-means++ and multiple restarts.
Q6. Single vs complete linkage: which one chains, and which prefers compact clusters?
→ Single chains (min distance); complete prefers compact (max distance).
Q7. In the E-step, what does \(\sum_k \gamma_{ik}\) equal, and why?
→ 1 — responsibilities are posterior probabilities \(P(C_k \mid x_i)\) via Bayes’ rule.
Q8. Name the one thing EM guarantees and the one thing it doesn’t.
→ Log-likelihood never decreases; no guarantee of the global maximum.
Q9. The MLE of \(\sigma^2\) divides by \(N\) or \(N-1\)?
→ \(N\). The sample variance \(s^2\) divides by \(N-1\). Know which one a problem asks for.
Q10. Doubling \(n\) does what to the width of a 95% CI for the mean?
→ Shrinks it by \(1/\sqrt{2}\) — width \(\propto 1/\sqrt{n}\).
Q11. \(k\) in a degree-\(k\) polynomial fit: parameter or hyperparameter? Who sets it?
→ Hyperparameter; chosen by cross-validation, never by training error.
Q12. Training error falls to zero as complexity grows. Is that bias or variance you’re seeing?
→ Variance: a different training sample would give a very different fit.
After the quiz: the team midterm project is released Wednesday and HW5 goes out Thursday. Enjoy the rest of today’s activity — trees are not on the quiz.