Skip to content

pca-transform - #42

Merged
Daniel15568 merged 2 commits into
Daniel15568:mainfrom
satexndra21l:main
Oct 28, 2026
Merged

Daniel15568 merged 2 commits into
Daniel15568:mainfrom
satexndra21l:main

Conversation

@satexndra21l

Copy link
Copy Markdown

This PR addresses Issue #30 by introducing "pca_transform()" to extend Percentify's existing PCA functionality.

The new function allows users to obtain PCA-transformed data directly within Percentify, complementing the existing "pca_variance()" and "loadings()" functions without requiring a separate implementation using scikit-learn.

Changes Made

•⁠ ⁠Added "pca_transform()" to "stats.py".
•⁠ ⁠Implemented support for selecting the number of principal components using "n_components".
•⁠ ⁠Included optional data standardisation and decimal precision control.
•⁠ ⁠Added support for pandas and Polars DataFrames.
•⁠ ⁠Used NumPy for PCA computations to maintain consistency with existing implementations.

Related Issue

Closes #30

@Daniel15568 Daniel15568 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the failing tests are due to pyarrow not supporting numpy 2>. I have merged and would specify afterwards. Thank you

@Daniel15568
Daniel15568 merged commit 1879586 into Daniel15568:main Oct 28, 2026
10 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PCA‐transform

2 participants