NLA-lib Explorer

Row sampling without replacement

Library · Result group

Theorem (hasSubspaceEmbedding_of_hasLaw_samplingSketchWithoutReplacement). Row sampling without replacement: if the leverage scores of \mathbf{U} (any shape and rank) satisfy \ell_i(\mathbf{U}) \le L / \lvert n \rvert, the row-sampling sketch without replacement with k samples is a subspace embedding for \operatorname{range}\mathbf{U} with constants 1 \mp \varepsilon outside probability 2 \operatorname{rank}\mathbf{U} \cdot e^{-\varepsilon^2 k / (3L)} \,, for 0 \le \varepsilon \le 1. Sampling without replacement is never worse than with replacement (NLAlib.hasSubspaceEmbedding_of_hasLaw_samplingSketch at uniform weights has the same bound). [Tropp2011a, Lemma 3.4] (the sampling step of the SRHT, there for orthonormal columns and L = \lvert n \rvert \max_i \ell_i, with the two Chernoff tails before weakening); [Tropp2015, Theorem 5.1.1] (the i.i.d. form).

Headline (provisional) General form: sizes are index types

Lean statement and details
NLAlib.hasSubspaceEmbedding_of_hasLaw_samplingSketchWithoutReplacement.{u_1, u_2, u_3, u_4, u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {k : Type u_3}
  {n : Type u_4} {r : Type u_5} [Fintype k] [Fintype n] [Fintype r] [DecidableEq n]
  {S : Ω → Matrix k n 𝕜} {U : Matrix n r 𝕜} {L ε : ℝ}
  (hS : HasLaw S (samplingSketchWithoutReplacement k n) μ)
  (hdom : ∀ (i : n), leverageScore U i ≤ L * (↑(Fintype.card n))⁻¹) (hε : 0 ≤ ε) (hε1 : ε ≤ 1) :
  HasSubspaceEmbedding S U (1 - ε) (1 + ε)
    (2 * ↑U.rank * rexp (-ε ^ 2 * ↑(Fintype.card k) / (3 * L))) μ

Full source on GitHub

Copy link

Other forms

Theorem (hasSubspaceEmbedding_of_hasLaw_samplingSketchWithoutReplacement_of_samplingEmbeddingDim_le). Row sampling without replacement, sample-size form: row sampling without replacement under the domination \ell_i(\mathbf{U}) \le L / \lvert n \rvert is a subspace embedding for \operatorname{range}\mathbf{U} with constants 1 \mp \varepsilon and failure probability \delta, for 0 < \varepsilon \le 1, \delta > 0 and <!-- value samplingEmbeddingDim \operatorname{rank}\mathbf{U} L \varepsilon \delta --> \lvert k \rvert \ge 3 L \log(2\operatorname{rank}\mathbf{U}/\delta)/\varepsilon^2 samples (NLAlib.samplingEmbeddingDim U.rank L ε δ), the size of sampling with replacement. [Tropp2011a, Lemma 3.4] (there for orthonormal columns, the sample size \alpha L \log d with d = \operatorname{rank}\mathbf{U} and the Chernoff tails left explicit). Asymptotic form: NLAlib.exists_forall_hasSubspaceEmbedding_of_hasLaw_samplingSketchWithoutReplacement.

General form: sizes are index types

Lean statement and details
NLAlib.hasSubspaceEmbedding_of_hasLaw_samplingSketchWithoutReplacement_of_samplingEmbeddingDim_le.{u_1,
    u_2, u_3, u_4, u_5}
  {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {𝕜 : Type u_2} [RCLike 𝕜] {k : Type u_3}
  {n : Type u_4} {r : Type u_5} [Fintype k] [Fintype n] [Fintype r] [DecidableEq n]
  {S : Ω → Matrix k n 𝕜} {U : Matrix n r 𝕜} {L ε δ : ℝ}
  (hS : HasLaw S (samplingSketchWithoutReplacement k n) μ)
  (hdom : ∀ (i : n), leverageScore U i ≤ L * (↑(Fintype.card n))⁻¹) (hε : 0 < ε) (hε1 : ε ≤ 1)
  (hδ : 0 < δ) (hk : samplingEmbeddingDim U.rank L ε δ ≤ ↑(Fintype.card k)) :
  HasSubspaceEmbedding S U (1 - ε) (1 + ε) δ μ

Full source on GitHub

Copy link

General form: sizes are index types. A size is carried by a finite index type: |k| is the number of elements of the index type k, and "k nonempty" means k ≥ 1.