Skip to content

Instantly share code, notes, and snippets.

View ssandra102's full-sized avatar
Focusing on the perfect coffee

Sandra Skaria ssandra102

Focusing on the perfect coffee
View GitHub Profile
@BALaka-18
BALaka-18 / pca.py
Last active October 29, 2022 20:48
Implementing Principal Component Analysis from scratch
'''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))'''