Created
August 11, 2017 20:06
-
-
Save EdMan1022/ab416aa45cf546647345e21311276be1 to your computer and use it in GitHub Desktop.
sklearn pca example
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
from sklearn import decomposition | |
import numpy as np | |
pca = decomposition.PCA(n_components=2) | |
X = np.array([[-1, -1], [-2, -1], [-3, -2], [1, 1], [2, 1], [3, 2]]) | |
x = pca.fit_transform(X) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment