Partial Canonical Correlation Analysis (pCCA) for neural data
Project description
Partial Canonical Correlation Analysis (pCCA)
A Python implementation of Partial Canonical Correlation Analysis (pCCA) designed for neuronal population recordings. pCCA identifies linear combinations of neurons that maximized interregional correlations, while statistically removing the influence of other recorded populations.
This code has been utilized in the following research: Subspace communication in the hippocampal-retrosplenial axis. Gonzalez and Vöröslakos, et al. (doi:10.64898/2025.12.31.697203)
Installation
pip install partial_CCA
Quick Start The PartialCCA class follows the standard scikit-learn API (fit, transform, score).
Usage in Python:
import numpy as np
from partial_CCA import PartialCCA
# Generate dummy data: 100 samples, 20 neurons in X, 15 in Y, 5 in Z
X = np.random.randn(100, 20)
Y = np.random.randn(100, 15)
Z = np.random.randn(100, 5)
# Initialize and fit the model
model = PartialCCA()
model.fit(X, Y, Z)
# Transform data into canonical components
proj_x, proj_y = model.transform(X, Y)
# Get canonical correlations
print(model.canonical_correlations_)
Features: If no variable Z is provided, the model automatically defaults to standard Canonical Correlation Analysis (CCA). Statistical Validation: Includes a surrogate_test method that uses circular shifting to calculate p-values for the observed correlations.
Examples & Tutorials: Examples on how to use these functions can be found here: https://github.com/joaqgonzar/pCCA-Hippocampus/
About the Author: Developed by Joaquin Gonzalez, Postdoc at the Buzsaki Lab and Chen Lab (NYU).
Google Scholar Profile: https://scholar.google.com/citations?user=rcGEkDgAAAAJ&hl=en
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 partial_cca-0.1.0.tar.gz.
File metadata
- Download URL: partial_cca-0.1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8a5bb803bc2138e42ca36a5adb59e9d2ce309d07d6395f3448f03e830ac536d
|
|
| MD5 |
30ee1bbe188ca3bb00f54fc11a909e66
|
|
| BLAKE2b-256 |
91bbd123af75b83832853945524ae6be34f13bb4f680dc935954e2bfc9d4e81b
|
File details
Details for the file partial_cca-0.1.0-py3-none-any.whl.
File metadata
- Download URL: partial_cca-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f31ddd33008efec70f4b8e4382e4ea13b9f972afca162e8b9df46c8f96ab611
|
|
| MD5 |
98a4960c6c6df8b5300ed2e6c761ef54
|
|
| BLAKE2b-256 |
08db2e1481ad146eb4fc2e4b384884abc97a0560fe79ab496946d8837e452876
|