Theorem 23.2: with A = ∑ xᵢxᵢᵀ = V diag(D) Vᵀ, D nonincreasing, the first n columns of V with W = Uᵀ minimize the PCA objective (23.1)
ProvedUnderstandingML.pca_theoremeigenvectorsleast-squarespcaspectral-decomposition
Theorem 23.2. Let be arbitrary vectors in , let , and let be eigenvectors of the matrix corresponding to the largest eigenvalues of . Then, the solution to the PCA optimization problem given in Equation (23.1) is to set to be the matrix whose columns are and to set .
Formally: are the first columns of a spectral decomposition with and nonincreasing, and has objective at most that of every ; .
Preamble
import Definitions.Def_UnderstandingML_DimReduction open MeasureTheory ProbabilityTheory
Formal statement
namespace UnderstandingML
/-- **Theorem 23.2** (p. 325). Let `x₁, …, x_m` be arbitrary vectors in `ℝ^d`, let
`A = ∑ᵢ xᵢxᵢᵀ`, and let `u₁, …, u_n` be `n` eigenvectors of the matrix `A` corresponding to the
largest `n` eigenvalues of `A`. Then the solution to the PCA optimization problem (23.1) is to
set `U` to be the matrix whose columns are `u₁, …, u_n` and to set `W = Uᵀ`.
The eigenvectors are the first `n` columns of a spectral decomposition `A = V diag(D) Vᵀ`,
`VᵀV = I`, with `D` nonincreasing; `n ≤ d`. -/
theorem pca_theorem {m d n : ℕ} (hn : n ≤ d) (x : Fin m → Fin d → ℝ)
(V : Matrix (Fin d) (Fin d) ℝ) (hV : V.transpose * V = 1) (D : Fin d → ℝ) (hD : Antitone D)
(hA : scatterMatrix x = V * Matrix.diagonal D * V.transpose)
(U : Matrix (Fin d) (Fin n) ℝ) (W : Matrix (Fin n) (Fin d) ℝ) :
pcaObjective x (V.submatrix id (Fin.castLE hn)) (V.submatrix id (Fin.castLE hn)).transpose ≤
pcaObjective x U W := 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.1 pp. 325-326, Theorem 23.2 with its proof
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.