Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import numpy as np
np.random.seed(4)
m = 60
w1, w2 = 0.1, 0.3
noise = 0.1
angles = np.random.rand(m) * 3 * np.pi / 2 - 0.5
X = np.empty((m, 3))
from sklearn.decomposition import PCA
pca = PCA(n_components = 2)
X2D = pca.fit_transform(X)
print(X2D)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment