Last active
June 8, 2022 04:14
-
-
Save rkdgusrn1212/903c421c4c4ff7fa20b4e8dc75d9de6b to your computer and use it in GitHub Desktop.
PCA(Principal Component Analysis)
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.decomposition import PCA | |
| X = (X - X.mean(axis=0)) / X.std(axis=0) | |
| pca = PCA() | |
| X_pca = pca.fit_transform(X) | |
| #X_pca는 2차원 ndarray다.row=index,column=principle component | |
| #pca.component_로 row=principle component col=feature인 2차원 배열을 얻을 수 있다. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment