Last active
December 27, 2018 15:11
-
-
Save RyotaBannai/5cbbbb55c182d9ba176352d449a75cab to your computer and use it in GitHub Desktop.
This file contains hidden or 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
T = X.dot(v) # Projecting sample data | |
T = T[:, 0:2] | |
# Or simply, T = X.dot(v_12) | |
T_mean = T.mean(axis=0) | |
C_T = np.cov(T.T) # Shape 2 *2 | |
wT, vT = LA.eig(C_T) | |
inxT = wT.argsort()[::-1] | |
wT, v = wT[inxT], vT[:, inxT] | |
w_12_T = wT[:2] | |
v_12_T = vT[:,:2] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment