S14 Machine learning · Practice
Problem set 8: PCA, sequences, sampling, ensembles and hardware
Problems dealt one at a time, with new numbers every time. The kinds you miss come back more often, and you can keep going as long as you like.
0 solved
0 in a row
0 of 16 kinds solid
Check
A covariance matrix with variances 2 and 1 and covariance 1.2.
(a)
First eigenvalue?
(b)
Fraction of variance it explains?
(c)
Its angle from the first axis?
Check
Eigenvalues 6, 2, 1.5, 0.4; 1000 samples of dimension 200 kept with two components.
(a)
Variance explained by two components?
(b)
Mean squared reconstruction error?
(c)
Compression factor?
Check
A two-state chain leaving state 1 with probability 0.05 and state 2 with probability 0.2, starting in state 1 with probability 1.
(a)
Stationary probability of state 1?
(b)
Mean stay in state 1?
(c)
Probability of state 1 after 4 steps?
Check
A machine is healthy with prior 0.6, stays healthy with probability 0.85, and raises an alarm with probability 0.15 when healthy and 0.8 when faulty. Hour 1 has an alarm.
(a)
P(faulty | alarm)?
(b)
(healthy)?
(c)
Probability of the path healthy–healthy with alarms in both hours?
Check
Monte Carlo with per-sample standard deviation 0.3; an inverse-CDF draw from an exponential of rate 4.
(a)
Samples for standard error 0.002?
(b)
Sample for u = 0.8?
Check
A Metropolis sampler for a zero-mean Gaussian with σ = 1.5 at x = 0.5 proposes a step 0.4 outward; separately, a chain of 50000 steps with neighbor correlation 0.8.
(a)
Acceptance probability?
(b)
Effective sample size?
Check
Importance weights 0.4, 1, 0.6; rejection sampling a density of maximum 2 on an interval of length 2 with a uniform proposal.
(a)
Effective sample size of the weights?
(b)
Acceptance rate?
Check
A split sends 25 positive and 5 negative left, 20 positive and 70 negative right.
(a)
Parent Gini impurity?
(b)
Weighted Gini of the children?
Check
An ensemble of 50 models with variance 1 and correlation 0.2; bootstrap samples of size 20.
(a)
Ensemble variance?
(b)
Fraction of distinct examples in a bootstrap sample?
Check
An AdaBoost learner with weighted error 0.2.
(a)
Its vote α?
(b)
Multiplier for misclassified weights?
(c)
Share of the weight on misclassified examples after renormalizing?
Check
A dense 1024-to-1024 layer at batch 16; a 3 × 10¹⁰-parameter model at 4 bits on 100 GB/s.
(a)
Layer FLOPs?
(b)
Model size in GB?
(c)
Token-rate bound at batch 1?
Check
A chip with 50 TFLOP/s and 1 TB/s runs an int8 layer at batch 64 (intensity about 2B); weights up to ±1 are quantized to int8.
(a)
Ridge point in FLOP/byte?
(b)
Attainable TFLOP/s?
(c)
RMS rounding error?
Check
A covariance matrix has variances 3 and 1 and covariance 1.2.
(a)
What is its smaller eigenvalue?
(b)
By what factor does whitening stretch that direction?
Check
A Gibbs sampler for a standard bivariate Gaussian with correlation 0.7 runs 50000 sweeps.
(a)
Where is x | y = 1 centered?
(b)
What effective sample size do its x values give?
Check
Gradient boosting with squared loss and learning rate 1 starts from the mean of the targets 2, 6 and 15, and adds a stump splitting 2 and 6 from 15.
(a)
What is the starting mean squared error?
(b)
What is it after one step?
Check
A dataset of 10000 points is randomly projected.
(a)
What dimension does the JL bound require at ε = 0.1?
(b)
Projected to 1024 dimensions, what's the typical relative spread of a squared length?
A kind of problem counts as solid once you've got it right on the first try twice in a row. Back to the lesson · Practice every topic in S14