from sklearn.decomposition import PCA
pca =PCA(n_components =2)
X_PCA =PCA.fit(data_x)
Asked
Active
Viewed 28 times
-2

Pranav Hosangadi
- 23,755
- 7
- 44
- 70
1 Answers
0
python is case sensitive - thus if your object is named pca, you cna't use PCA instead. try:
from sklearn.decomposition import PCA
pca =PCA(n_components =2)
X_PCA =pca.fit(data_x)

Dan Aizenberg
- 69
- 7
-
Oh shoot, didn't notice that. – Pranav Hosangadi Sep 21 '20 at 19:59