Skip to content

Add pca_transform - #41

Closed
satexndra21l wants to merge 1 commit into
Daniel15568:mainfrom
satexndra21l:main
Closed

satexndra21l wants to merge 1 commit into
Daniel15568:mainfrom
satexndra21l:main

Conversation

@satexndra21l

@satexndra21l satexndra21l commented Oct 15, 2026 •

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.

Thank you for your contributions, the contributing requires checks to be passed for both polars and pandas.

Please add the checks and create a new pull request.

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