Repository navigation
Add VARIMAX Rotation Support to Database-Backed PCA in VerticaPy - #1375
Closed
rocketsharma wants to merge 1 commit into
Closed
rocketsharma wants to merge 1 commit into
rocketsharma wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds VARIMAX rotation support to the database-backed PCA implementation in VerticaPy by reusing the existing rotation functionality from the in-memory PCA (MemModel).
Previously, PCA rotation was available only in MemModel PCA. With this enhancement, users can apply rotation directly to a PCA model trained in Vertica and execute rotated transformations within the database.
Changes
Example
Validation Update – Vertica 26.4
Successfully validated PCA VARIMAX rotation against Vertica Analytic Database v26.4.0-20261030 on RHEL8.
Test results:
PCA VARIMAX integration tests: 14 passed
Full PCA, SVD and MCA regression suites: 101 passed, 16 skipped, 0 failed
Offline rotation tests: Passed
Verified functionality:
VARIMAX and Quartimax rotation match the existing MemModel implementation.
Rotated SQL results match Vertica's native APPLY_PCA output after rotation.
Both scale=True and scale=False work correctly.
transform(), deploySQL(), and supported SQL export operations behave as expected.
Model refitting and reloading correctly reset rotation state.
Existing PCA, SVD and MCA functionality remains unaffected in the tested suites.
Environment:
Vertica: 26.4.0-20261030
Python: 3.14.6
pytest: 9.2.0
OS: RHEL8
All executed tests passed. No test failures were observed.
Files Modified