Last active
December 19, 2018 16:24
-
-
Save RyotaBannai/728f0d55ea737a77b009c4393d797dbc 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
rng = np.random.RandomState(1) | |
X_raw = np.dot(rng.rand(2, 2), rng.randn(2, 200)).T | |
X_mean = X_raw.mean(axis=0) | |
X -= X_mean | |
U, s, Vt = LA.svd(X, full_matrices=False) | |
V = Vt.T | |
S = np.diag(s) | |
e_values = (s ** 2) / X.shape[0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment