A GPU-based Incremental PCA implementation.
Project description
PCAonGPU
A powerful implementation of Incremental Principal Components Analysis that runs on GPU, built on top of PyTorch.
Installation
- Clone the repository:
git clone https://github.com/YourUsername/PCAonGPU.git
- Navigate to the cloned directory:
cd PCAonGPU
- Install the required dependencies:
pip install -r requirements.txt
Usage
from gpu_pca import PCAonGPU
# Create an instance
model = PCAonGPU(n_components=5)
# Fit the model (either using `fit` or `partial_fit`)
model.fit(your_data)
# Transform the data
transformed_data = model.transform(your_data)
Benchmark
SKlearn on an AMD Ryzen 9 5900X 12-Core Processor vs PCAonGPU on an Nvidia 4090
Data size: 5000 samples of 5000 dimensional data:
> python tests/benchmark_gpu_pca.py
test_sklearn_pca took 21.78324556350708 seconds to complete its execution.
test_gpu_pca took 6.523377895355225 seconds to complete its execution.
Data size: 50000 samples of 5000 dimensional data.
> python tests/benchmark_gpu_pca.py
test_sklearn_pca took 65.70944833755493 seconds to complete its execution.
test_gpu_pca took 11.030456304550171 seconds to complete its execution.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file PCAonGPU-0.1.tar.gz.
File metadata
- Download URL: PCAonGPU-0.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce2e498d4d57cec5ef744283fa2d36e5d8a6aea2a0391d5cd247ca6666b0d4d9
|
|
| MD5 |
d68eb5a71cc6cb22acff35857157ada2
|
|
| BLAKE2b-256 |
375e09791ddd025cc68d2d07632bc4fc1f7e5cfccb0c8552b0f05d8621269a2d
|
File details
Details for the file PCAonGPU-0.1-py3-none-any.whl.
File metadata
- Download URL: PCAonGPU-0.1-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bee61848100b23fb5a40d6c6b00b238c875fefd16062884e3b07df1f678aef9
|
|
| MD5 |
4fb46ec2d6dcfbce88118eca838764de
|
|
| BLAKE2b-256 |
1b6a6c0dd0cdc2397826e45c4a688e0e8bfc0d9b6664fe1967e95358600c6c7a
|