Skip to content

gianlucatruda/pca-vis

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

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