Lemma 23.4 (Johnson–Lindenstrauss): for finite Q and ε = √(6 log(2|Q|/δ)/n) ≤ 3/4, a random N(0,1/n) matrix has sup_{x∈Q} |‖Wx‖²/‖x‖² − 1| < ε with probability ≥ 1 − δ
ProvedUnderstandingML.johnson_lindenstraussconcentrationjohnson-lindenstraussrandom-projections
Lemma 23.4 (Johnson-Lindenstrauss Lemma). Let be a finite set of vectors in . Let and be an integer such that . Then, with probability of at least over a choice of a random matrix such that each element of is distributed normally with zero mean and variance of we have
Formally: the vectors of are nonzero, , and the failure event has probability at most .
Why . The lemma is Lemma 23.3 with a union bound over . The printed condition inherits Lemma 23.3's false range: with , and large , exceeds . The proofs that use the lemma (Lemma 23.12) apply it at .
Preamble
import Definitions.Def_UnderstandingML_DimReduction open MeasureTheory ProbabilityTheory
Formal statement
namespace UnderstandingML
/-- **Lemma 23.4 (Johnson-Lindenstrauss Lemma)** (p. 329). Let `Q` be a finite set of vectors in
`ℝ^d`. Let `δ ∈ (0, 1)` and `n` be an integer such that `ε = √(6 log(2|Q|/δ)/n) ≤ 3/4`. Then, with
probability of at least `1 − δ` over a choice of a random matrix `W ∈ ℝ^{n×d}` such that each
element of `W` is distributed normally with zero mean and variance of `1/n` we have
`sup_{x ∈ Q} |‖Wx‖²/‖x‖² − 1| < ε`. The vectors of `Q` are nonzero and `n ≥ 1`. The book's condition `ε ≤ 3` inherits the false range of
Lemma 23.3: for `|Q| = 1` and `ε = 1` it fails for large `n`. -/
theorem johnson_lindenstrauss {d : ℕ} (Q : Finset (Fin d → ℝ)) (hQ : ∀ x ∈ Q, x ≠ 0) (δ : ℝ)
(hδ : 0 < δ) (hδ1 : δ < 1) (n : ℕ) (hn : 0 < n)
(hε : Real.sqrt (6 * Real.log (2 * Q.card / δ) / n) ≤ 3 / 4) :
gaussianMatrixLaw n d (n : NNReal)⁻¹
{W | ∃ x ∈ Q, Real.sqrt (6 * Real.log (2 * Q.card / δ) / n) ≤
|sqNorm ((Matrix.of W).mulVec x) / sqNorm x - 1|} ≤ ENNReal.ofReal δ := by sorry
end UnderstandingML
Source
Shalev-Shwartz and Ben-David, Understanding Machine Learning: From Theory to Algorithms, Cambridge University Press 2014, doi:10.1017/CBO9781107298019, §23.2 pp. 329-330, Lemma 23.4 with its proof
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.