Docsity

LINEAR ALGEBRA AND OPTIMIZATION FOR MACHINE LEARNING COMPREHENSIVE EXAM SCRIPT VERIFIED QU, Exams of Advanced Algorithms

Toggle sidebar
bg1
LINEAR ALGEBRA AND OPTIMIZATION
FOR MACHINE LEARNING
COMPREHENSIVE EXAM SCRIPT VERIFIED
QUESTIONS AND SOLUTIONS GRADED
APLUS
โ—โ— What does the gradient of the least squares objective equal?
Answer: $ \nabla f(x) = 2A^\top(Ax-b) $.
โ—โ— What is the geometric meaning of least squares?
Answer: Least squares chooses $ \hat x $ so that $ A\hat x $ is the
orthogonal projection of $ b $ onto the column space of $ A $.
โ—โ— What is the condition for the uniqueness of the least-squares
solution?
Answer: The solution is unique if $ A^\top A $ is invertible (i.e.,
columns of $ A $ are linearly independent).
โ—โ— What is the ridge regression objective?
Answer: $ \min_x \|Ax-b\|_2^2 + \lambda\|x\|_2^2 $.
โ—โ— What are the normal equations for ridge regression?
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download LINEAR ALGEBRA AND OPTIMIZATION FOR MACHINE LEARNING COMPREHENSIVE EXAM SCRIPT VERIFIED QU and more Exams Advanced Algorithms in PDF only on Docsity!

LINEAR ALGEBRA AND OPTIMIZATION

FOR MACHINE LEARNING

COMPREHENSIVE EXAM SCRIPT VERIFIED

QUESTIONS AND SOLUTIONS GRADED

APLUS

โ—โ— What does the gradient of the least squares objective equal? Answer: $ \nabla f(x) = 2A^\top(Ax-b) $. โ—โ— What is the geometric meaning of least squares? Answer: Least squares chooses $ \hat x $ so that $ A\hat x $ is the orthogonal projection of $ b $ onto the column space of $ A $. โ—โ— What is the condition for the uniqueness of the least-squares solution? Answer: The solution is unique if $ A^\top A $ is invertible (i.e., columns of $ A $ are linearly independent). โ—โ— What is the ridge regression objective? Answer: $ \min_x |Ax-b|_2^2 + \lambda|x|_2^2 $. โ—โ— What are the normal equations for ridge regression?

Answer: $ (A^\top A + \lambda I)x = A^\top b $. โ—โ— What is the solution to the ridge regression problem? Answer: $ x = (A^\top A + \lambda I)^{-1}A^\top b $. โ—โ— What is the general Tikhonov regularization objective? Answer: $ \min_x |Ax-b|_2^2 + \lambda|Wx|2^2 $. โ—โ— What are the normal equations for general Tikhonov regularization? Answer: $ (A^\top A + \lambda W^\top W)x = A^\top b $. โ—โ— How do you convert pairwise differences into a matrix equation? Answer: If a measurement says $ x_i - x_j \approx d $, create one row in $ A $ with $ +1 $ in column $ i $, $ - 1 $ in column $ j $, and set the corresponding entry of $ b $ to $ d $. โ—โ— What does the denoising regularizer using a difference matrix penalize? Answer: It penalizes roughness by enforcing $ |Dx|2^2 = \sum{k=1}^{n-1}(x{k+1}-x_k)^2 $. โ—โ— What is the test for a symmetric matrix to be positive definite?

Answer: $ \nabla_x (x^\top A x) = 2Ax $. โ—โ— What is the chain rule for the residual vector in terms of the Jacobian? Answer: $ \nabla_\theta f(\theta) = 2J(\theta)^\top r(\theta) $. โ—โ— What is the sigmoid function? Answer: $ \sigma(z) = \frac{1}{1 + e^{-z}} $. โ—โ— What is the derivative of the sigmoid function? Answer: $ \sigma'(z) = \sigma(z)(1 - \sigma(z)) $. โ—โ— What is the logistic loss for one example? Answer: $ \ell(m) = \log(1 + e^{-m}) $. โ—โ— What is the gradient of the logistic negative log-likelihood? Answer: $ \nabla_w(-\ell) = \sum_i (p_i - y_i)x_i $. โ—โ— What is the perceptron update rule? Answer: If misclassified, update $ w \leftarrow w + \eta y x $. โ—โ— What is the squared hinge loss for one example?

Answer: $ \ell = \max(0, 1 - m)^2 $. โ—โ— What is the typical form of a regularized classification objective? Answer: $ \min_w \sum_i \ell_i(w) + \lambda|w|2^2 $. โ—โ— What is the regularized classification objective formula? Answer: [\min_w \sum_i \ell_i(w)+\lambda|w|2^2] โ—โ— What does the gradient add in regularized classification? Answer: $ 2\lambda w $ โ—โ— What is Bayes' rule? Answer: [P(C\mid x)=\frac{P(x\mid C)P(C)}{P(x)}] โ—โ— What does MAP classification rule predict? Answer: [\hat C=\arg\max_C P(C\mid x)=\arg\max_C P(x\mid C)P(C)] โ—โ— What is the Naive Bayes independence assumption? Answer: [P(x\mid C)=\prod{j=1}^d P(x_j\mid C)] โ—โ— How is the class score computed in Naive Bayes in log space? Answer: [\log P(C) + \sum{j=1}^d \log P(x_j\mid C)]

โ—โ— What is the kNN classification rule? Answer: Compute distances to training points, pick the $ k $ closest, and predict the majority label. โ—โ— Why does feature scaling matter for kNN? Answer: Distances are dominated by features with large numeric scale. โ—โ— What is the k-means objective? Answer: [\min_{{\mu_j}} \sum_{i=1}^n \min_{j\in{1..k}} |x_i- \mu_j|_2^2] โ—โ— What are the steps of the k-means algorithm in one iteration? Answer: 1) Assignment: assign each point to nearest centroid. 2) Update: set each centroid to mean of points assigned to it. โ—โ— Why can k-means get stuck? Answer: The objective is not convex; initialization matters. โ—โ— What is the distance between clusters in hierarchical single-linkage? Answer: Minimum pairwise distance between their points. โ—โ— What is a high bias signature in a learning curve?

Answer: Training error high and validation error high; adding more data does not reduce error much. โ—โ— What is a high variance signature in a learning curve? Answer: Training error low but validation error high; adding more data often helps. โ—โ— What is the softmax definition? Answer: For scores $ z\in\mathbb{R}^K $: [\mathrm{softmax}(z)i = \frac{e^{z_i}}{\sum{j=1}^K e^{z_j}}] โ—โ— What is the softmax stability trick? Answer: Subtract $ m=\max_j z_j $: [\mathrm{softmax}(z)_i=\frac{e^{z_i-m}}{\sum_j e^{z_j-m}}] โ—โ— What is the log-sum-exp identity? Answer: [\log\sum_j e^{z_j} = m + \log\sum_j e^{z_j-m},\ m=\max_j z_j] โ—โ— What is the significance of the log-sum-exp trick? Answer: It helps avoid overflow and underflow. โ—โ— What are the metric axioms?

โ—โ— What is a common symptom of LOG manipulation mistakes? Answer: Treating $ \log(a+b) $ as $ \log a + \log b $. โ—โ— What is a common symptom of EXP overflow / underflow? Answer: Softmax/log-likelihood algebra not stable. โ—โ— What is a common symptom of CONFUSION matrix metric mix- ups? Answer: Precision/recall swapped; FN vs FP confusion. โ—โ— What is a common symptom of k-means centroid update errors? Answer: Using median or wrong average; forgetting cluster assignment step. โ—โ— What is a common symptom of proof structure missing errors? Answer: Proving triangle inequality without a clear plan. โ—โ—