NLA-lib Explorer

NLAlib.sketchAndProject

Library ยท def

The sketch-and-project step for \mathbf{A} \in \Bbbk^{m \times n}, a sketch \mathbf{S} \in \Bbbk^{k \times m}, \mathbf{b} \in \Bbbk^m and a point \mathbf{x}: \mathsf{sketchAndProject}(\mathbf{A}, \mathbf{S}, \mathbf{b}, \mathbf{x}) := \mathbf{x} + (\mathbf{S}\mathbf{A})^{+}\mathbf{S}(\mathbf{b} - \mathbf{A}\mathbf{x})\,, the point nearest \mathbf{x} among the least-squares solutions of the sketched system \mathbf{S}\mathbf{A}\mathbf{y} = \mathbf{S}\mathbf{b}, which are its solutions when that system is consistent (NLAlib.isLeastSquaresSolution_sketchAndProject, NLAlib.norm_sub_sketchAndProject_le_of_isLeastSquaresSolution). Total; the step is the identity when \mathbf{S}\mathbf{A} = \mathbf{0}. The argument order is that of NLAlib.sketchAndSolve. [GowerRichtarik2015, (2.2), (2.7)]; there with a metric \mathbf{B} and the sketch \mathbf{S}^{\mathsf{T}}, here \mathbf{B} = \mathbf{I} and the sketch on the left.

NLAlib.sketchAndProject.{u_1, u_2, u_3, u_4} {๐•œ : Type u_1} [RCLike ๐•œ] {k : Type u_2} {m : Type u_3}
  {n : Type u_4} [Fintype k] [Fintype m] [Fintype n] (A : Matrix m n ๐•œ) (S : Matrix k m ๐•œ)
  (b : m โ†’ ๐•œ) (x : n โ†’ ๐•œ) : n โ†’ ๐•œ

Full source on GitHub

Import NLAlib.Regression.SketchAndProject.