S14 Machine learning · Practice
Random projections
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 8 kinds solid
Check
How many dimensions does the Johnson–Lindenstrauss bound require for 100000 points at distortion ε = 0.1?
Check
A unit vector is projected to 64 dimensions with entries. What is the standard deviation of its projected squared length?
Check
At ε = 0.1, how many more dimensions does the bound require for 10 times as many points (starting from 10000)?
Check
1000 million vectors of 1024 dimensions (4-byte floats) are randomly projected to 32 dimensions.
(a)
How much memory do the original vectors take?
(b)
By what factor does the projection shrink them?
Check
For one fixed vector projected to 200 dimensions, the chance its squared length is off by more than ε = 0.1 is at most . What is that bound?
Check
Test the lemma. With rng = numpy.random.default_rng(seed), draw n = 100 points in 5000 dimensions from a standard Gaussian, then a projection matrix R = rng.standard_normal((k, 5000))/sqrt(k) with k = 200. Compute all pairwise squared distances before and after projecting, and set max_dist, the largest |ratio − 1| over all pairs, and rms_dist, the RMS of (ratio − 1). Compare rms_dist with .
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
What dimension does the JL bound give for 5000 points at ε = 0.15?
Check
What's the typical relative spread in squared length after projecting to 64 dimensions?
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