Skip to content

A GPU-compatible PyTorch implementation of Incremental PCA for memory-efficient dimensionality reduction on large datasets.

License

Notifications You must be signed in to change notification settings

sirluk/pytorch_incremental_pca

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyTorch Incremental PCA

PyPI Version License

This project provides a PyTorch implementation of the Incremental PCA algorithm, inspired by the IncrementalPCA class from scikit-learn and the repository PCAonGPU. This implementation has some shortcomings with regards to the precision of operations leading to vastly different results compared to the sklearn implemtation. The IncrementalPCA class in this repo produces outputs which are very close to the sklearn implementation with the added benefit of running on GPU.

Incremental PCA is a valuable technique for dimensionality reduction when dealing with large datasets that cannot fit entirely into memory.

Features

  • PyTorch Integration: Seamlessly use incremental PCA within your PyTorch workflows.
  • Memory Efficiency: Process large datasets incrementally without loading everything into memory at once.
  • Similar API: Familiar interface if you've used scikit-learn's IncrementalPCA.
  • Customization: Easily extend or modify the core functionality to suit your specific needs.

Installation

pip install torch-incremental-pca

Usage

import torch_incremental_pca as tip

pca = tip.IncrementalPCA(n_components=32)

About

A GPU-compatible PyTorch implementation of Incremental PCA for memory-efficient dimensionality reduction on large datasets.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages