A PyCuda Covariance Matrix Parallel Implementation
Project description
PyCUDACov - A PyCuda Covariance Matrix Parallel Implementation
Usage and Installation
Requires CUDA enviroment.
Installation:
$ pip install pycudacov
Basic Usage
from sklearn.datasets import make_blobs
from sklearn.preprocessing import StandardScaler
from pandas import DataFrame
import numpy as np
from pycudacov import get_cov
# Generate test dataset
rows, cols = 16384, 1024 # samples, features
X, y = make_blobs(n_samples = rows, centers = 2, n_features = cols)
X_std = StandardScaler().fit_transform(X) # Optional
df = DataFrame(X_std)
df = df.astype(np.float32)
# Call to PyCUDA Kernel, return the cov. matrix and
# GPU execution time in milliseconds
covariance_matrix, gpu_exec_time = get_cov(df.values)
Limitations
-The maximum number of features or columns of the data matrix is up to 1024
License
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
pycudacov-0.1.1.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for pycudacov-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8036cfcaf4adea8395bb418a1d7d129ac16df91c5edf4939b4249edc72a37199 |
|
MD5 | dcc64906f62ca6fdbd66f10daae11995 |
|
BLAKE2b-256 | e0f07cdcf380631667da7cb26d612eb83786ae0accd648128303f6cd635ce9f6 |