Multiset Canonical Correlation Analysis
Python implementation of multiset Canonical Correlation Analysis (mCCA) methods: sumcor, maxvar, minvar, ssqcor, genvar.
Installing multiset_canonical_correlation_analysis
The only pre-requisite is to have Python 3 (>= version 3.11) installed. The mCCA package can be installed with
pip install multiset_canonical_correlation_analysis
Required third party packages will automatically be installed.
Quickstart
First, the imports:
import numpy as np
from multiset_canonical_correlation_analysis import mcca, simulations
from independent_vector_analysis.helpers_iva import _bss_isi
Create $K=100$ datasets with $T=10000$ samples of $N=5$ source components in each dataset. The $N$ SCVs all have a different maximum eigenvalue.
N = 5
K = 100
T = 10000
alpha = 1 - (K - np.array([10, 15, 20, 25, 30])) / (K - 1)
scv_cov = simulations.scv_covs_with_rank_R(N, K, 1, alpha=alpha, beta=0.0)
X, A, S = simulations.generate_datasets_from_covariance_matrices(scv_cov, T)
where
S: true sources of dimensions N x T x KA: mixing matrix of dimensions N x N x KX: observed datasets of dimensions N x T x K
Apply mCCA-genvar to find the canonical variables.
transform, U = mcca.mcca(X, 'genvar')
where
transform: transformation matrix of dimensions N x N x KU: canonical variables of dimensions N x T x K, withU[:,:,k] = transform[:,:,k].T @ X[:,:,k]
Calculate the jISI to evaluate JBSS performance.
W = np.moveaxis(transform, [0, 1, 2], [1, 0, 2])
print(f'joint_isi genvar: {_bss_isi(W, A)[1]}')
A jISI smaller than 0.05 means successful JBSS, i.e., the canonical variables are permuted and scaled versions of the true sources.
Contact
In case of questions, suggestions, problems etc., please send an email to isabell.lehmann@sst.upb.de, or open an issue here on Github.
Citing
If you use this package in an academic paper, please cite [1].
@article{Lehmann2025,
title={A Comprehensive Guide to Multiset Canonical Correlation Analysis and its Application to Joint Blind Source Separation},
author={Lehmann, Isabell and Gabrielson, Ben and Hasija, Tanuj and Adali, T{\"u}lay},
journal={tba},
year={tba},
publisher={tba}
}
[1] I. Lehmann, B. Gabrielson, et al., A Comprehensive Guide to Multiset Canonical Correlation Analysis and its Application to Joint Blind Source Separation, submitted in 2025
Metadata
Release files for multiset-canonical-correlation-analysis 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| multiset_canonical_correlation_analysis-0.0.2.tar.gz | 14.7 kB | Without provenance | Details for multiset_canonical_correlation_analysis-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| multiset_canonical_correlation_analysis-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for multiset_canonical_correlation_analysis-0.0.2-py3-none-any.whl |
Total release size: 30.9 kB
Release files / multiset_canonical_correlation_analysis-0.0.2.tar.gz
| Download URL | multiset_canonical_correlation_analysis-0.0.2.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fdcd0519b9bd56e7d6741bc1893e8dd3199ea68912ad838d34ce5e6a5237da23
|
|
BLAKE2b-256 checksum How to use checksums |
7a96a628f4c14cf4230a712a9d9428da079088b89c8035f1c532aa173e14d554
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / multiset_canonical_correlation_analysis-0.0.2-py3-none-any.whl
| Download URL | multiset_canonical_correlation_analysis-0.0.2-py3-none-any.whl |
|---|---|
| Size | 16.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1b4dc7cf8a3296ed7a6f8ee416fddd0810a53e01e6d4e9b156193edd000763aa
|
|
BLAKE2b-256 checksum How to use checksums |
c9d8e357dad3f855645e260c228bc8bf2c36b0d74e233a3ba59e9f31dbc298b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for multiset-canonical-correlation-analysis 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.