Beruflich Dokumente
Kultur Dokumente
1. Introduction.
Each of the principal components is chosen in such a way so that it would describe
most of the still available variance and all these principal components are orthogonal to each
other. In all principal components first principal component has maximum variance.
3. Objectives of PCA.
5. Eigenvector.
6. Eigen Values
Source Code
pca = PCA()
X_train = pca.fit_transform(X_train)
X_test = pca.transform(X_test)
explained_variance = pca.explained_variance_ratio_
pca = PCA(n_components=1)
X_train = pca.fit_transform(X_train)
X_test = pca.transform(X_test)
print(X_train.shape)
print(X_test.shape)