This file contains 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
'''Question : Create a python class PCA in “pca.py” to implement PCA (Principle component analysis). | |
The deliverable is a class that can be used as follows: | |
from pca import PCA | |
… . | |
… . | |
pca_model = PCA(n_component=2) | |
pca_model.fit(x) | |
print(pca_model.variance_ratio) | |
print(pca_model.transform(data))''' |