Independent Vector Analysis
This package contains the Python versions of Independent Vector Analysis (IVA-G [1] and IVA-L-SOS [2]), converted from the MLSP-Lab MATLAB Codes.
- Website: http://mlsp.umbc.edu/jointBSS_introduction.html
- Source-code: https://github.com/SSTGroup/independent_vector_analysis
Installing independent_vector_analysis
The only pre-requisite is to have Python 3 (>= version 3.6) installed. The iva package can be installed with
pip install independent_vector_analysis
Required third party packages will automatically be installed.
Quickstart
First, the imports:
import numpy as np
from independent_vector_analysis import iva_g, consistent_iva
from independent_vector_analysis.data_generation import MGGD_generation
Create a dataset with N=3 sources, which are correlated across K=4 datasets. Each source consists of T=10000 samples:
N = 3
K = 4
T = 10000
rho = 0.7
S = np.zeros((N, T, K))
for idx in range(N):
S[idx, :, :] = MGGD_generation(T, K, 'ar', rho, 1)[0].T
A = np.random.randn(N,N,K)
X = np.einsum('MNK, NTK -> MTK', A, S)
W, cost, Sigma_n, isi = iva_g(X, A=A, jdiag_initW=False)
Apply IVA-G to reconstruct the sources. If the mixing matrix A is passed, the ISI is calculated. Let the demixing matrix W be initialized by joint diagonalization:
W, cost, Sigma_n, isi = iva_g(X, A=A, jdiag_initW=False)
W is the estimated demixing matrix. cost is the cost for each iteration. Sigma_n[:,:,n] contains the covariance matrix of the nth SCV. isi is the joint ISI for each iteration.
Find the most consistent result of 500 runs in IVA-L-SOS:
iva_results = consistent_iva(X, which_iva='iva_l_sos', n_runs=500)
where iva_results is a dict containing:
- 'W' : estimated demixing matrix of dimensions N x N x K
- 'W_change' : change in W for each iteration
- 'S' : estimated sources of dimensions N x T x K
- 'A' : estimated mixing matrix of dimensions N x N x K
- 'scv_cov' : covariance matrices of the SCVs, of dimensions K x K x N (the same as Sigma_n in iva_g / iva_l_sos)
- 'cross_isi' : cross joint ISI for each run compated with all other runs
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 [3].
@inproceedings{Lehmann2022,
title = {Multi-task fMRI Data Fusion Using IVA and PARAFAC2},
author = {Lehmann, Isabell and Acar, Evrim and Hasija, Tanuj and Akhonda, M.A.B.S. and Calhoun, Vince D. and Schreier, Peter J. and Adali, T{\"u}lay},
booktitle={ICASSP 2022-2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)},
pages={1466--1470},
year={2022},
organization={IEEE}
}
[1] M. Anderson, T. Adali, & X.-L. Li, Joint Blind Source Separation with Multivariate Gaussian Model: Algorithms and Performance Analysis, IEEE Transactions on Signal Processing, 2012, 60, 1672-1683
[2] S. Bhinge, R. Mowakeaa, V.D. Calhoun, T. Adalı, Extraction of time-varying spatio-temporal networks using parameter-tuned constrained IVA, IEEE Transactions on Medical Imaging, 2019, vol. 38, no. 7, 1715-1725
[3] I. Lehmann, E. Acar, et al., Multi-task fMRI Data Fusion Using IVA and PARAFAC2, ICASSP 2022 - 2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2022, pp. 1466-1470
Metadata
Release files for independent-vector-analysis 0.3.6
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 |
|---|---|---|---|---|
| independent_vector_analysis-0.3.6.tar.gz | 25.7 kB | Without provenance | Details for independent_vector_analysis-0.3.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| independent_vector_analysis-0.3.6-py3-none-any.whl | Python 3 | none | any | Details for independent_vector_analysis-0.3.6-py3-none-any.whl |
Total release size: 63.0 kB
Release files / independent_vector_analysis-0.3.6.tar.gz
| Download URL | independent_vector_analysis-0.3.6.tar.gz |
|---|---|
| Size | 25.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bd8cadb674ece0b3c3b3da42482e3f01983e7164e20d36f699c5c4c165409d2e
|
|
BLAKE2b-256 checksum How to use checksums |
d97b95e035db9f6e571f5e90ab8e3efe7251834fd4c07c71b82912707b57803c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / independent_vector_analysis-0.3.6-py3-none-any.whl
| Download URL | independent_vector_analysis-0.3.6-py3-none-any.whl |
|---|---|
| Size | 37.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e6af265a05227fb02d9cbadaa5b129e3be730b6ccf0a13bdb9fcea8eeb3efe6
|
|
BLAKE2b-256 checksum How to use checksums |
ffc9543929f20a936cd2090b81e8b500396e73532116cf1ddadf722426bc2a5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for independent-vector-analysis 0.3.6
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.