Last active
June 19, 2017 23:55
-
-
Save 0x0L/0f05873911b3d764f5194b6797cd6fd3 to your computer and use it in GitHub Desktop.
Projection on hyperplanes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A = np.array([ | |
[1, 1, 1], | |
[0.8, 0.7, 0.5] | |
]) | |
assert np.linalg.matrix_rank(A) == len(A) | |
Q, _ = np.linalg.qr(A.T) | |
P = np.eye(len(Q)) - Q @ Q.T | |
np.allclose(P @ P, P) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment