Sketched least squares with Gaussian and Haar sketches
Library · Source module
Sketched least squares with Gaussian and Haar sketches
For a standard Gaussian p \times m sketch \mathbf{S}, a fixed basis \mathbf{X} of rank q with q + 2 \le p and every \mathbf{B}, the oblique projection \mathbf{\Pi}_{\mathbf{X},\mathbf{S}} (NLAlib.obliqueProjector) inflates the error of the orthogonal projection by exactly the factor 1 + q/(p - q - 1), in expectation: \mathbb{E}\|(\mathbf{I}-\mathbf{\Pi}_{\mathbf{X},\mathbf{S}})\mathbf{B}\|_{\mathsf{F}}^2 = \Bigl(1 + \frac{q}{p-q-1}\Bigr) \|(\mathbf{I}-\mathbf{P}_{\mathbf{X}})\mathbf{B}\|_{\mathsf{F}}^2\,. At \mathbf{X} = \mathbf{A} this is Epperly and Webber's exact mean squared residual of Gaussian sketch-and-solve, and the solution \mathsf{sketchAndSolve}(\mathbf{A}, \mathbf{S}, \mathbf{B}) is unbiased. The excess \mathbf{\Pi}_{\mathbf{X},\mathbf{S}}(\mathbf{I}-\mathbf{P}_{\mathbf{X}})\mathbf{B} has a second spectral moment of order 1/p times the Frobenius residual: the core noise of generalized Nyström.
The proofs take an orthonormal basis \mathbf{Q}_1 of \operatorname{range}\mathbf{X} and one, \mathbf{Q}_2, of the range of the residual (\mathbf{I}-\mathbf{P}_{\mathbf{X}})\mathbf{B}; on the almost sure event \operatorname{rank}(\mathbf{S}\mathbf{X}) = \operatorname{rank}\mathbf{X} the excess is \mathbf{Q}_1(\mathbf{S}\mathbf{Q}_1)^{+}(\mathbf{S}\mathbf{Q}_2) \mathbf{Q}_2^{\mathsf{H}}(\mathbf{I}-\mathbf{P}_{\mathbf{X}})\mathbf{B}, a Gaussian block whose moments are in NLAlib.RandomMatrix.Gaussian.BlockMoments. Unbiasedness is a symmetry: the reflection 2\mathbf{P}_{\mathbf{A}} - \mathbf{I} preserves the Gaussian law, fixes \mathbf{A} and negates the residual. The sketch is on the left, \mathbf{S} : p \times m, as in the other Gaussian sketching files; a co-range test matrix \mathbf{\Psi} is the sketch \mathbf{\Psi}^{\mathsf{H}} (NLAlib.hasLaw_conjTranspose_of_hasLaw_gaussianMatrix). Scaling the sketch changes nothing (NLAlib.obliqueProjector_smul_right).
For an m \times p Haar frame \mathbf{Q} with p \le m and the sketch \mathbf{Q}^{\mathsf{H}} the factor is <!-- value haarProjectionFactor m p q --> 1 + (m - p)/(m - q) \cdot (q/(p - q - 1)) (NLAlib.haarProjectionFactor m p q), at most the Gaussian one: orthogonality helps, but only a bit. Every Haar statement carries p \le m: a wider Haar frame has orthonormal rows, the sketch is an isometry and the factor would be 1. Real throughout.
Main results
* NLAlib.integral_frobNorm_one_sub_obliqueProjector_mul_sq_of_hasLaw_gaussianMatrix: the Gaussian completion identity. * NLAlib.integral_frobNorm_sub_mul_sketchAndSolve_sq_of_hasLaw_gaussianMatrix: the exact mean squared residual of Gaussian sketch-and-solve. * NLAlib.integral_sketchAndSolve_of_hasLaw_gaussianMatrix: unbiasedness. * the spectral norm of the excess, integral_specNorm_obliqueProjector_mul_one_sub_rangeProjector_mul_sq_le_of_hasLaw_gaussianMatrix and its numerical form for 4q \le p (the same name with _le_div_card in place of _le). * the first spectral moment of the excess through a left factor \mathbf{F}, in namespace NLAlib: integral_specNorm_mul_obliqueProjector_mul_one_sub_rangeProjector_mul_le_of_hasLaw_gaussianMatrix * NLAlib.haarProjectionFactor_le_gaussianProjectionFactor. * Haar sketches: the completion identity NLAlib.integral_frobNorm_one_sub_obliqueProjector_mul_sq_of_hasLaw_haarFrame, the exact mean squared residual NLAlib.integral_frobNorm_sub_mul_sketchAndSolve_sq_of_hasLaw_haarFrame, and unbiasedness, NLAlib.integral_sketchAndSolve_of_hasLaw_haarFrame. * NLAlib.integral_frobNorm_sub_mul_sketchAndSolve_sq_le_one_add_mul_of_hasLaw_gaussianMatrix, NLAlib.integral_frobNorm_sub_mul_sketchAndSolve_sq_le_one_add_mul_of_hasLaw_haarFrame: expected relative squared residual, with rank-zero-safe O((r+1)/\varepsilon) forms NLAlib.exists_forall_integral_frobNorm_sub_mul_sketchAndSolve_sq_le_of_hasLaw_gaussianMatrix and NLAlib.exists_forall_integral_frobNorm_sub_mul_sketchAndSolve_sq_le_of_hasLaw_haarFrame.
Declarations
- NLAlib.ae_specNorm_obliqueProjector_mul_eq_of_hasLaw_gaussianMatrix
- NLAlib.exists_forall_integral_frobNorm_sub_mul_sketchAndSolve_sq_le_of_hasLaw_gaussianMatrix
- NLAlib.exists_forall_integral_frobNorm_sub_mul_sketchAndSolve_sq_le_of_hasLaw_haarFrame
- NLAlib.haarProjectionFactor_le_gaussianProjectionFactor
- NLAlib.integrable_frobNorm_one_sub_obliqueProjector_mul_sq_of_hasLaw_gaussianMatrix
- NLAlib.integrable_frobNorm_one_sub_obliqueProjector_mul_sq_of_hasLaw_haarFrame
- NLAlib.integrable_frobNorm_sub_mul_sketchAndSolve_sq_of_hasLaw_gaussianMatrix
- NLAlib.integrable_frobNorm_sub_mul_sketchAndSolve_sq_of_hasLaw_haarFrame
- NLAlib.integrable_sketchAndSolve_of_hasLaw_gaussianMatrix
- NLAlib.integrable_sketchAndSolve_of_hasLaw_haarFrame
- NLAlib.integrable_specNorm_obliqueProjector_mul_one_sub_rangeProjector_mul_sq_of_hasLaw_gaussianMatrix
- NLAlib.integral_frobNorm_one_sub_obliqueProjector_mul_sq_of_hasLaw_gaussianMatrix
- NLAlib.integral_frobNorm_one_sub_obliqueProjector_mul_sq_of_hasLaw_haarFrame
- NLAlib.integral_frobNorm_sub_mul_sketchAndSolve_sq_le_one_add_mul_of_hasLaw_gaussianMatrix
- NLAlib.integral_frobNorm_sub_mul_sketchAndSolve_sq_le_one_add_mul_of_hasLaw_haarFrame
- NLAlib.integral_frobNorm_sub_mul_sketchAndSolve_sq_of_hasLaw_gaussianMatrix
- NLAlib.integral_frobNorm_sub_mul_sketchAndSolve_sq_of_hasLaw_haarFrame
- NLAlib.integral_sketchAndSolve_of_hasLaw_gaussianMatrix
- NLAlib.integral_sketchAndSolve_of_hasLaw_haarFrame
- NLAlib.integral_specNorm_mul_obliqueProjector_mul_one_sub_rangeProjector_mul_le_of_hasLaw_gaussianMatrix
- NLAlib.integral_specNorm_obliqueProjector_mul_one_sub_rangeProjector_mul_sq_le_div_card_of_hasLaw_gaussianMatrix
- NLAlib.integral_specNorm_obliqueProjector_mul_one_sub_rangeProjector_mul_sq_le_of_hasLaw_gaussianMatrix