Row sampling
Library · Source module
Row sampling
For weights p : n \to \mathbb{R}_{\ge 0} and indices \iota : k \to n, the row-sampling sketch NLAlib.samplingSketchMatrix p ι : Matrix k n 𝕜 has row j equal to (\lvert k \rvert \, p_{\iota(j)})^{-1/2} \, \mathbf{e}_{\iota(j)}^{\mathsf{H}}; its law NLAlib.samplingSketch k p is the pushforward of \lvert k \rvert i.i.d. indices with law NLAlib.samplingMeasure p. The measurable space on the row index n is fixed to ⊤ inside the definition, so no statement carries an instance on n; NLAlib.samplingSketch_eq_sum_smul_dirac gives the law as a finite mixture of Diracs and NLAlib.samplingSketch_eq_map recovers the pushforward under any measurable space on n with measurable singletons.
For a fixed \mathbf{U} : n \times r of any shape and rank and weights dominating its leverage scores, \ell_i(\mathbf{U}) \le L p_i for every i, the sketch is a random subspace injection with failure probability d\, e^{-\varepsilon^2 k / (2L)} and a random subspace embedding with constants 1 \mp \varepsilon and failure probability 2 d\, e^{-\varepsilon^2 k / (3L)} for 0 \le \varepsilon \le 1, d = \operatorname{rank}\mathbf{U} and k the number of samples (matrix Chernoff). Exact leverage sampling is L = \operatorname{rank}\mathbf{U}, uniform sampling L = \operatorname{coh}\mathbf{U}, the coherence. The sample sizes are named quantities (docs/contributing/statements.md §2, rule 2), with their inversions NLAlib.two_mul_mul_exp_le_of_samplingEmbeddingDim_le and NLAlib.mul_exp_le_of_samplingInjectionDim_le; the "k \ge \ldots suffices" forms are corollaries of the tails.
Degenerate cases. Rank zero (\mathbf{U} = \mathbf{0}): every failure event is empty and every bound is 0. Empty k: \mathbf{S} = \mathbf{0}, the bound d \cdot e^0 is at least 1 when \mathbf{U} \ne \mathbf{0}, and the upper half holds surely; the sketch is not isotropic, hence [Nonempty k] on isotropy. A zero weight p_i = 0 gives a zero sketch row (junk (\sqrt{0})^{-1} = 0), and the domination hypothesis then forces row i of \mathbf{U} to vanish (NLAlib.leverageScore_eq_zero_iff). L \le 0 forces rank zero, so no 0 < L is assumed. For \varepsilon \ge 1 the injection is vacuous (NLAlib.isSubspaceInjection_of_nonpos). The two corollaries at the leverage-score distribution and at uniform weights take no \sum_i p_i = 1: when their weights fail it (\mathbf{U} = \mathbf{0}, or n empty) the law is the zero measure for nonempty k, so HasLaw forces \mu = 0, and for empty k the law is a Dirac mass at \mathbf{0}, a probability measure; in both subcases \operatorname{rank}\mathbf{U} = 0 and every embedding event is full.
Proofs. The two halves pass to an orthonormal basis \mathbf{Q} of \operatorname{range}\mathbf{U}, whose rows satisfy \|\mathbf{q}_i\|^2 \le L p_i, and to the product space of the indices; there the Gram-atoms identity writes (\mathbf{S}\mathbf{Q})^{\mathsf{H}} \mathbf{S}\mathbf{Q} as a sum of independent positive semidefinite atoms, each at most (L / \lvert k \rvert) \, \mathbf{I}, with means summing to \mathbf{Q}^{\mathsf{H}}\mathbf{Q} = \mathbf{I}, and matrix Chernoff (NLAlib.Probability.MatrixConcentration.ChernoffSum) bounds its extreme eigenvalues. Isotropy is the same identity at \mathbf{A} = \mathbf{B} = \mathbf{I}.
Main definitions
* NLAlib.samplingSketchMatrix: the sketch built from given indices. * NLAlib.samplingSketch: its law for i.i.d. indices. * NLAlib.samplingEmbeddingDim, NLAlib.samplingInjectionDim: the sample sizes for a subspace of dimension d; the embedding needs <!-- value samplingEmbeddingDim d L \varepsilon \delta --> \lvert k \rvert \ge 3 L \log(2d/\delta)/\varepsilon^2 samples, the injection <!-- value samplingInjectionDim d L \varepsilon \delta --> \lvert k \rvert \ge 2 L \log(d/\delta)/\varepsilon^2.
Main results
* NLAlib.samplingSketch_eq_sum_smul_dirac, NLAlib.samplingSketch_eq_map, NLAlib.hasLaw_samplingSketchMatrix: the law as a mixture, as a pushforward, and the bridge from a user's own indices. * NLAlib.conjTranspose_samplingSketchMatrix_mul_mul: the sketched cross-Gram matrix as an average of rank-one atoms. * NLAlib.samplingSketchMatrix_mul_conjTranspose_of_injective: distinct indices give a diagonal \mathbf{S}\mathbf{S}^{\mathsf{H}}. * NLAlib.isIsotropicSketch_of_hasLaw_samplingSketch: isotropy for positive weights. * NLAlib.hasSubspaceInjection_of_hasLaw_samplingSketch, NLAlib.hasSubspaceEmbedding_zero_of_hasLaw_samplingSketch: the two halves. * NLAlib.hasSubspaceEmbedding_of_hasLaw_samplingSketch: row sampling under leverage domination. * NLAlib.hasSubspaceEmbedding_of_hasLaw_samplingSketch_leverageScoreDistribution, NLAlib.hasSubspaceEmbedding_of_hasLaw_samplingSketch_const_inv_card: exact leverage and uniform sampling. * NLAlib.two_mul_mul_exp_le_of_samplingEmbeddingDim_le, NLAlib.mul_exp_le_of_samplingInjectionDim_le: the tails inverted at the sample sizes. * NLAlib.hasSubspaceEmbedding_of_hasLaw_samplingSketch_of_samplingEmbeddingDim_le, NLAlib.hasSubspaceInjection_of_hasLaw_samplingSketch_of_samplingInjectionDim_le: sample sizes. * NLAlib.exists_forall_hasSubspaceEmbedding_of_hasLaw_samplingSketch, NLAlib.exists_forall_hasSubspaceInjection_of_hasLaw_samplingSketch: the asymptotic forms, O(L \log(d/\delta)/\varepsilon^2) samples.
Declarations
- NLAlib.conjTranspose_samplingSketchMatrix_mul_mul
- NLAlib.exists_forall_hasSubspaceEmbedding_of_hasLaw_samplingSketch
- NLAlib.exists_forall_hasSubspaceInjection_of_hasLaw_samplingSketch
- NLAlib.hasLaw_samplingSketchMatrix
- NLAlib.hasSubspaceEmbedding_of_hasLaw_samplingSketch
- NLAlib.hasSubspaceEmbedding_of_hasLaw_samplingSketch_const_inv_card
- NLAlib.hasSubspaceEmbedding_of_hasLaw_samplingSketch_leverageScoreDistribution
- NLAlib.hasSubspaceEmbedding_of_hasLaw_samplingSketch_of_samplingEmbeddingDim_le
- NLAlib.hasSubspaceEmbedding_zero_of_hasLaw_samplingSketch
- NLAlib.hasSubspaceInjection_of_hasLaw_samplingSketch
- NLAlib.hasSubspaceInjection_of_hasLaw_samplingSketch_of_samplingInjectionDim_le
- NLAlib.isFiniteMeasure_samplingSketch
- NLAlib.isIsotropicSketch_of_hasLaw_samplingSketch
- NLAlib.isProbabilityMeasure_samplingSketch
- NLAlib.mul_exp_le_of_samplingInjectionDim_le
- NLAlib.row_eq_zero_of_norm_sq_le
- NLAlib.samplingEmbeddingDim
- NLAlib.samplingEmbeddingDim_def
- NLAlib.samplingEmbeddingDim_le
- NLAlib.samplingEmbeddingDim_mono
- NLAlib.samplingEmbeddingDim_nonneg
- NLAlib.samplingInjectionDim
- NLAlib.samplingInjectionDim_def
- NLAlib.samplingInjectionDim_le
- NLAlib.samplingInjectionDim_mono
- NLAlib.samplingInjectionDim_nonneg
- NLAlib.samplingSketch
- NLAlib.samplingSketchMatrix
- NLAlib.samplingSketchMatrix_eq_diagonal_mul
- NLAlib.samplingSketchMatrix_mul_conjTranspose_of_injective
- NLAlib.samplingSketch_eq_map
- NLAlib.samplingSketch_eq_sum_smul_dirac
- NLAlib.two_mul_mul_exp_le_of_samplingEmbeddingDim_le