Skip to content

Kinozuko/pca

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Principal Component Analysis

Original made in Colabotory, it will have three version:

  • Colaboratory
  • Jupyter notebook
  • Python script

In this repository we will show how to apply PCA to reduce dimensionality in datasets.

Steps involved in PCA

  • Standardize the data
  • Compute covariance matrix
  • Obtain the Eigenvectors and Eigenvalues from the covariance matrix
  • Sort eigenvalues in descending order and choose the top k Eigenvectors that correspond to the k largest eigenvalues
  • nstruct the projection matrix W from the selected k Eigenvectors
  • Transform the original data set X via W to obtain the new k-dimensional feature subspace Y

Structure

.
├── .gitignore 
├── README.md
├── requirements.txt
├── jupyter/
│   └── pca.ipynb
├── script/
│   └── pca.py
│   └── pca.png

Runing Project

Installing Dependecies

  • pip install -r requirements.txt

Running Script

  • python script/pca.py

Running Jupyter Notebook

  • jupyter notebook jupyter/pca.ipynb

Running Colaboratory

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published