S1448 of 55
0 XP
  1. Hook
  2. Problems

S14 · Problem set 8

Problem set 8: principal components and explained variance, Markov chains and the forward algorithm, Monte Carlo and MCMC, trees, bagging and boosting, and the cost of running networks

These problems cover lessons 40 to 47: eigenvalues and angles of covariance matrices, explained variance and compression, random projections, stationary distributions, filtering and path probabilities, Monte Carlo sample sizes, inverse-CDF and Metropolis steps, effective sample sizes, impurity and ensemble variance, AdaBoost's weights, and FLOPs, bytes, rooflines and quantization.

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)

α1(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?

Have paper and a calculator ready. Work each problem out by hand, then enter the answer. Your first try on each one counts toward your score.

Practice

Keep practicing

16 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.