SkillAgentSearch skills...

Pca

pca: A Python Package for Principal Component Analysis.

Install / Use

/learn @erdogant/Pca
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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

<div>

<a href="https://erdogant.github.io/pca/"><img src="https://github.com/erdogant/pca/blob/master/docs/figs/iris_density.png" width="175" align="left" /></a> 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 ⭐️

</div>

Key Features

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


Resources and Links


Installation

pip install pca
from pca import pca

Examples

<table style="width:100%"> <!-- Row 1 --> <tr> <th><a href="https://erdogant.github.io/pca/pages/html/Examples.html">Quick Start</a></th> <th><a href="https://erdogant.github.io/pca/pages/html/Plots.html#biplot">Make Biplot</a></th> </tr> <tr> <td align="left"> <a href="https://erdogant.github.io/pca/pages/html/Examples.html"> <img src="https://github.com/erdogant/pca/blob/master/docs/figs/fig_scatter.png?raw=true" width="400" /> </a> </td> <td align="left"> <a href="https://erdogant.github.io/pca/pages/html/Plots.html#biplot"> <img src="https://github.com/erdogant/pca/blob/master/docs/figs/custom_example_2.png?raw=true" width="350" /> </a> </td> </tr> <!-- Row 2 --> <tr> <th><a href="https://erdogant.github.io/pca/pages/html/Plots.html#explained-variance-plot">Explained Variance Plot</a></th> <th><a href="https://erdogant.github.io/pca/pages/html/Plots.html#d-plots">3D Plots</a></th> </tr> <tr> <td align="left"> <a href="https://erdogant.github.io/pca/pages/html/Plots.html#explained-variance-plot"> <img src="https://github.com/erdogant/pca/blob/master/docs/figs/fig_plot.png" width="350" /> </a> </td> <td align="left"> <a href="https://erdogant.github.io/pca/pages/html/Plots.html#d-plots"> <img src="https://github.com/erdogant/pca/blob/master/docs/figs/iris_3d_density.png" width="350" /> </a> </td> </tr> <!-- Row 3 --> <tr> <th><a href="https://erdogant.github.io/pca/pages/html/Plots.html#alpha-transparency">Alpha Transparency</a></th> <th><a href="https://erdogant.github.io/pca/pages/html/Algorithm.html#normalizing-out-pcs">Normalize Out Principal Components</a></th> </tr> <tr> <td align="left"> <a href="https://erdogant.github.io/pca/pages/html/Plots.html#alpha-transparency"> <img src="https://github.com/erdogant/pca/blob/master/docs/figs/fig_scatter.png" width="350" /> </a> </td> <td align="left"> <a href="https://erdogant.github.io/pca/pages/html/Algorithm.html#normalizing-out-pcs"> <img src="https://i.stack.imgur.com/Wb1rN.png" width="350" /> </a> </td> </tr> <!-- Row 4: Feature Importance --> <tr> <th colspan="2"><a href="https://erdogant.github.io/pca/pages/html/Examples.html#feature-importance">Extract Feature Importance</a></th> </tr> <tr> <td colspan="2"> Make the biplot to visualize the contribution of each feature to the principal components. <br/><br/> <a href="https://i.stack.imgur.com/V6BYZ.png"> <img src="https://i.stack.imgur.com/V6BYZ.png" width="350" /> </a> <a href="https://i.stack.imgur.com/831NF.png"> <img src="https://i.stack.imgur.com/831NF.png" width="350" /> </a> </td> </tr> <!-- Row 5 --> <tr> <th><a href="https://erdogant.github.io/pca/pages/html/Outlier%20detection.html">Detect Outliers</a></th> <th><a href="https://erdogant.github.io/pca/pages/html/Plots.html#biplot-only-arrows">Show Only Loadings</a></th> </tr> <tr> <td align="left"> Detect outliers using Hotelling's T² and Fisher’s method across top components (PC1–PC5). <br/><br/> <a href="https://erdogant.github.io/pca/pages/html/Outlier%20detection.html"> <img src="https://github.com/erdogant/pca/blob/master/docs/figs/outliers_biplot_spe_hot.png" width="170" /> <img src="https://github.com/erdogant/pca/blob/master/docs/figs/outliers_biplot3d.png" width="170" /> </a> </td> <td align="left"> <a href="https://erdogant.github.io/pca/pages/html/Plots.html#biplot-only-arrows"> <img src="https://github.com/erdogant/pca/blob/master/docs/figs/biplot_only_directions.png" width="350" /> </a> </td> </tr> <!-- Row 6 --> <tr> <th><a href="https://erdogant.github.io/pca/pages/html/Outlier%20detection.html#selection-of-the-outliers">Select Outliers</a></th> <th><a href="https://erdogant.github.io/pca/pages/html/Plots.html#toggle-visible-status">Toggle Visibility</a></th> </tr> <tr> <td align="left"> Select and filter identified outliers for deeper inspection or removal. </td> <td align="left"> Toggle visibility of samples and components to clean up visualizations. </td> </tr> <!-- Row 7 --> <tr> <th colspan="2"><a href="https://erdogant.github.io/pca/pages/html/Examples.html#map-unseen-datapoints-into-fitted-space">Map Unseen Datapoints</a></th> </tr> <tr> <td colspan="2"> Project new data into the transformed PCA space. This enables testing new observations without re-fitting the model. </td> </tr> </table>

Contributors

Setting up and maintaining PCA has been possible thanks

View on GitHub
GitHub Stars338
CategoryDevelopment
Updated2d ago
Forks52

Languages

Jupyter Notebook

Security Score

100/100

Audited on Mar 27, 2026

No findings