Skip to main content

pca: A Python Package for Principal Component Analysis.

Project description

Python Pypi Docs LOC Downloads Downloads License Github Forks Open Issues Project Status DOI Medium Colab GitHub repo size Donate

pca is a Python package for Principal Component Analysis. The core of PCA is built on sklearn functionality to find maximum compatibility when combining with other packages. But this package can do a lot more. Besides the regular PCA, it can also perform SparsePCA, and TruncatedSVD. Depending on your input data, the best approach can be chosen. pca contains the most-wanted analysis and plots. Navigate to API documentations for more detailed information. ⭐️ Star it if you like it ⭐️


Key Features

Feature Description
Fit and Transform Perform the PCA analysis.
Biplot and Loadings Make Biplot with the loadings.
Explained Variance Determine the explained variance and plot.
Best Performing Features Extract the best performing features.
Scatterplot Create scaterplot with loadings.
Outlier Detection Detect outliers using Hotelling T2 and/or SPE/Dmodx.
Normalize out Variance Remove any bias from your data.
Save and load Save and load models.
Analyze discrete datasets Analyze discrete datasets.

Resources and Links


Installation

pip install pca
from pca import pca

Examples

Quick Start Make Biplot
Explained Variance Plot 3D Plots
Alpha Transparency Normalize Out Principal Components
Extract Feature Importance
Make the biplot to visualize the contribution of each feature to the principal components.

Detect Outliers Show Only Loadings
Detect outliers using Hotelling's T² and Fisher’s method across top components (PC1–PC5).

Select Outliers Toggle Visibility
Select and filter identified outliers for deeper inspection or removal. Toggle visibility of samples and components to clean up visualizations.
Map Unseen Datapoints
Project new data into the transformed PCA space. This enables testing new observations without re-fitting the model.

Contributors

Setting up and maintaining PCA has been possible thanks to users and contributors. Thanks to:

Maintainer

  • Erdogan Taskesen, github: erdogant
  • Contributions are welcome.
  • Yes! This library is entirely free but it runs on coffee! :) Feel free to support with a Coffee.

Buy me a coffee

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pca-2.10.0.tar.gz (36.6 kB view details)

Uploaded Source

Built Distribution

pca-2.10.0-py3-none-any.whl (34.4 kB view details)

Uploaded Python 3

File details

Details for the file pca-2.10.0.tar.gz.

File metadata

  • Download URL: pca-2.10.0.tar.gz
  • Upload date:
  • Size: 36.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for pca-2.10.0.tar.gz
Algorithm Hash digest
SHA256 84c026fd87f8dee086be8ae86e735c442cde167219dac2369cbcae0b0cc66511
MD5 517896955d4af1f63f9e167b757a130a
BLAKE2b-256 9cd2d501de0173ad01821833c6e2f5c44da34fb2730c15e73e3b757907a205d6

See more details on using hashes here.

File details

Details for the file pca-2.10.0-py3-none-any.whl.

File metadata

  • Download URL: pca-2.10.0-py3-none-any.whl
  • Upload date:
  • Size: 34.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for pca-2.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e34e44490b23a213adfa288e061ba1c3b47d465debe12095edd939d9231d22a
MD5 2abf77522e7aa86806fade7e5bd4e9f2
BLAKE2b-256 0926fa61cbb3fee15df02a36824edb64e0fcd27df1abefeaff84218b78afe773

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page