Skip to content

gianlucatruda/pca-vis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PCA Visualisation

Real-time tool for exploring the relationships between PCA components and input features.

Or, "Roughly what do these principal components actually correspond to?"

Demonstration GIF

Features

  • Real-time plot to give intuition about prinipal components.
  • Sliders dynamically created for each input feature.
  • Sliders begin at mean and are scaled to feature data ranges, giving an intuitive feel of how "sensitive" the components are to each feature.

Installation

pip install -r requirements.txt

Matplotlib has to be installed as a framework.

Usage

Run the demo on the iris dataset using:

python3 pca_vis.py

Or load any dataset as a Pandas DataFrame and pass it into the main() function as an argument.

Understanding

To learn a bit more about PCA, check out my friend Gary's repo.

Contributions

This project was inspired by this one and adapted the generic slider code from here.

Releases

No releases published

Packages

No packages published

Languages