pydiodon.project_on¶
- pydiodon.project_on(A)[source]¶
Builds the projection operator on space spanned by the columns of an array
- Parameters
- Aa \(n \times p\) 2D numpy array
the projector is on the space in \(\mathbf{R}^n\) spanned by the columns of A
- Returns
- Pa 2D numpy array, \(n \times n\)
the projector
Notes
This function uses the QR decomposition of A, which avoids to compute \((A'A)^{-1}\) which is costly (one product, one inverse). It proceeds as
A = QR
P = QQ’
Example
import numpy as np import pydiodon as dio n = 10 ; p = 5 A = np.random.randn(n,p) P = project_on(A)
af, 22/02/2018, 22.10.13, 22.10.28