pca

pca: A Python Package for Principal Component Analysis.

https://github.com/erdogant/pca

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.1%) to scientific vocabulary

Keywords

3d-plot biplot explained-variance hotelling-t2 outliers pca principal-component-analysis
Last synced: 4 months ago · JSON representation ·

Repository

pca: A Python Package for Principal Component Analysis.

Basic Info
Statistics
  • Stars: 320
  • Watchers: 4
  • Forks: 47
  • Open Issues: 12
  • Releases: 56
Topics
3d-plot biplot explained-variance hotelling-t2 outliers pca principal-component-analysis
Created almost 6 years ago · Last pushed 4 months ago
Metadata Files
Readme Funding License Citation

README.md

Python Pypi Docs LOC Downloads Downloads License Github Forks Open Issues Project Status DOI Medium Gumroad 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](https://erdogant.github.io/pca/) for more detailed information. **⭐️ Star it if you like it ⭐️**

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

bash pip install pca

python 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

Owner

  • Name: Erdogan
  • Login: erdogant
  • Kind: user
  • Location: Den Haag

Machine Learning | Statistics | Bayesian | D3js | Visualizations

Citation (CITATION.cff)

# YAML 1.2
---
authors: 
  -
    family-names: Taskesen
    given-names: Erdogan
    orcid: "https://orcid.org/0000-0002-3430-9618"
cff-version: "1.1.0"
date-released: 2020-10-07
keywords: 
  - "python"
  - "Feature Extraction"
  - "PCA"
  - "Principal component analysis"
license: "MIT"
message: "If you use this software, please cite it using these metadata."
repository-code: "https://erdogant.github.io/pca"
title: "pca: A Python Package for Principal Component Analysis."
version: "1.8.4"
...

GitHub Events

Total
  • Create event: 3
  • Release event: 2
  • Issues event: 5
  • Watch event: 36
  • Issue comment event: 6
  • Push event: 24
  • Fork event: 3
Last Year
  • Create event: 3
  • Release event: 2
  • Issues event: 5
  • Watch event: 36
  • Issue comment event: 6
  • Push event: 24
  • Fork event: 3

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 445
  • Total Committers: 6
  • Avg Commits per committer: 74.167
  • Development Distribution Score (DDS): 0.018
Past Year
  • Commits: 14
  • Committers: 1
  • Avg Commits per committer: 14.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
erdogant e****t@g****m 437
Daniel Scott 6****4 4
hovinh h****9@g****m 1
Valentin Iovene v****n@t****y 1
Nick Girardo n****o@g****m 1
Alyetama 5****a 1
Committer Domains (Top 20 + Academic)
too.gy: 1

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 54
  • Total pull requests: 7
  • Average time to close issues: 2 months
  • Average time to close pull requests: 1 day
  • Total issue authors: 36
  • Total pull request authors: 5
  • Average comments per issue: 2.37
  • Average comments per pull request: 1.43
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 3
  • Pull requests: 0
  • Average time to close issues: 5 months
  • Average time to close pull requests: N/A
  • Issue authors: 3
  • Pull request authors: 0
  • Average comments per issue: 0.67
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • BrandonKMLee (6)
  • PARODBE (3)
  • nightvision04 (3)
  • rejusam (3)
  • jcpeterson (3)
  • weiping2020 (2)
  • koutoftimer (2)
  • normanius (2)
  • nigebLM (2)
  • Rendiere (2)
  • Ayoubzinini (1)
  • vinisalazar (1)
  • CatChenal (1)
  • wmsheer (1)
  • hovinh (1)
Pull Request Authors
  • nightvision04 (3)
  • tgy (1)
  • nickgirardo (1)
  • hovinh (1)
  • Alyetama (1)
Top Labels
Issue Labels
enhancement (7) question (6)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 313,155 last-month
  • Total dependent packages: 4
  • Total dependent repositories: 14
  • Total versions: 57
  • Total maintainers: 1
pypi.org: pca

pca: A Python Package for Principal Component Analysis.

  • Homepage: https://erdogant.github.io/pca
  • Documentation: https://pca.readthedocs.io/
  • License: MIT License Copyright (c) 2020 Erdogan Taskesen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 2.10.0
    published 6 months ago
  • Versions: 57
  • Dependent Packages: 4
  • Dependent Repositories: 14
  • Downloads: 313,155 Last month
Rankings
Dependent packages count: 3.2%
Downloads: 3.4%
Dependent repos count: 3.9%
Stargazers count: 4.2%
Average: 4.2%
Forks count: 6.4%
Maintainers (1)
Last synced: 4 months ago

Dependencies

docs/source/requirements.txt pypi
  • pipinstallsphinx_rtd_theme *
requirements-dev.txt pypi
  • irelease * development
  • nbconvert * development
  • numpy * development
  • pytest * development
  • rst2pdf * development
  • sphinx * development
  • sphinx_rtd_theme * development
  • sphinxcontrib-fulltoc * development
  • spyder-kernels ==2.3. development
requirements.txt pypi
  • colourmap *
  • matplotlib *
  • numpy *
  • pandas *
  • scatterd *
  • scipy *
  • sklearn *
  • tqdm *
  • wget *
setup.py pypi
  • colourmap *
  • matplotlib *
  • numpy *
  • pandas *
  • scatterd *
  • scipy *
  • sklearn *
  • tqdm *
  • wget *
.github/workflows/codeql-analysis.yml actions
  • actions/checkout v2 composite
  • github/codeql-action/analyze v1 composite
  • github/codeql-action/autobuild v1 composite
  • github/codeql-action/init v1 composite