# Comple Model Identification using Independent Vector Analysis (CMI-IVA)
This package contains the Python versions of CMI-IVA [1].
For CMI-IVA please visit:
- https://mlsp.umbc.edu/Siddique
For IVA please visit:
- http://mlsp.umbc.edu/jointBSS_introduction.html
- https://github.com/SSTGroup/independent_vector_analysis
Installing iva_order_selection
pip install independent_vector_analysis
####################################################
Pre-requisite:
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.
###################################################
First, the imports:
import numpy as np
from independent_vector_analysis import *
from independent_vector_analysis.data_generation import MGGD_generation
Example:
N = 10 # No. Sources
T = 1000 # No. Samples
K = 15 # No. datasets (subjects)
rho = [0.9,0.8,0.7]
# Common and distinct source generation
source_mat = np.zeros((N,T,K))
scv_cov_mat = np.zeros((K,K,N))
# Common sources across K datasets
for i in range(len(rho)):
(temp,scv_cov_mat[:,:,i]) = MGGD_generation(T,K,'uniform',rho[i],0.5)
source_mat[i,:,:] = temp.T
# Common sources with sub-group structure across K datasets
(temp,scv_cov_mat[:,:,len(rho)]) = MGGD_generation(T,K,'block',{'val': 0.01, 'blocks': [(0.9, 0, 3), (0.01, 3,14)]},0.5)
source_mat[len(rho),:,:] = temp.T
# Distinct sources across K datasets
for i in range(len(rho)+1,N,1):
(temp,scv_cov_mat[:,:,i]) = MGGD_generation(T,K,'ar',0.01,0.5)
source_mat[i,:,:] = temp.T
# Create datasets by mixing with randomly generated mixing matrices
mix_mat = np.random.randn(N,N,K)
data_mat = np.zeros((N,T,K))
for k in range(K):
data_mat[:,:,k] = mix_mat[:,:,k]@source_mat[:,:,k]
# Apply CMI-IVA
iva_results, Order, Corr_struct = order_selection_iva(data_mat)
Output:
iva_results: tuple
-iva_results[0] = W : np.ndarray
The estimated demixing matrices of dimensions N x N x K so that ideally
W[k] @ A[k] = P @ D[k], where P is any arbitrary permutation matrix and D[k] is any
diagonal invertible (scaling) matrix. Note that P is common to all datasets. This is
to indicate that the local permutation ambiguity between dependent sources
across datasets should ideally be resolved by IVA.
-iva_results[1] = cost : float
The cost for each iteration
-iva_results[2] = Sigma_N : np.ndarray
Covariance matrix of each source component vector, with dimensions K x K x N
-iva_results[3] = isi : float
Order: dict
-'mdl': int
Common order estimated by the minimum description length (MDL) criteria
-'aic': int
Common order estimated by the akaike information criterion (AIC)
-'mdl_results': np.ndarray
Number of subgroup in each SCV estimated by MDL (N)
-'aic_results': np.ndarray
Number of subgroup in each SCV estimated by AIC (N)
Corr_struct: dict
-'eig': np.ndarray
Estimated eigenvalues for each SCV (K x N)
-'eig_str': np.ndarray
Estimated correlation structire in each SCV (K x K x N)
## Contact
akhondams@nih.gov or mo32@umbc.edu
## Citing
If you use this package in an academic paper, please cite [1].
@INPROCEEDINGS{9523414,
author={Akhonda, M. A. B. S. and Gabrielson, Ben and Calhoun, Vince D. and Adali, Tülay},
booktitle={2021 IEEE Data Science and Learning Workshop (DSLW)},
title={Complete Model Identification Using Independent Vector Analysis: Application to the Fusion of Task FMRI Data},
year={2021},
volume={},
number={},
pages={1-6},
doi={10.1109/DSLW51110.2021.9523414}}
[1] M. A. B. S. Akhonda, B. Gabrielson, V. D. Calhoun and T. Adali,"Complete Model Identification Using Independent Vector Analysis: Application to the Fusion of Task FMRI Data," 2021 IEEE Data Science and Learning Workshop (DSLW), Toronto, ON, Canada, 2021, pp. 1-6, doi: 10.1109/DSLW51110.2021.9523414.
Raw data
{
"_id": null,
"home_page": "https://mlsp.umbc.edu/Siddique",
"name": "iva-order-selection",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "iva,model order selection,multiset analysis,common and distinct",
"author": "M. A. B. S. Akhonda",
"author_email": "akhondams@nih.gov",
"download_url": "https://files.pythonhosted.org/packages/70/85/a8b67086bb6b863ca7edeb15dac89c3b8aa6699b4b39cae9ffdf8e155bc7/iva_order_selection-0.0.2.tar.gz",
"platform": null,
"description": "# Comple Model Identification using Independent Vector Analysis (CMI-IVA)\n\nThis package contains the Python versions of CMI-IVA [1].\n\nFor CMI-IVA please visit:\n- https://mlsp.umbc.edu/Siddique\n\nFor IVA please visit:\n- http://mlsp.umbc.edu/jointBSS_introduction.html\n- https://github.com/SSTGroup/independent_vector_analysis\n\n\n\nInstalling iva_order_selection\t\n\n\tpip install independent_vector_analysis\n\n####################################################\n\nPre-requisite:\n\nInstalling independent_vector_analysis\n\nThe only pre-requisite is to have **Python 3** (>= version 3.6) installed.\nThe iva package can be installed with\n\n pip install independent_vector_analysis\n\nRequired third party packages will automatically be installed.\n\n\n\n################################################### \n\nFirst, the imports:\n\n import numpy as np\n from independent_vector_analysis import *\n from independent_vector_analysis.data_generation import MGGD_generation\n\nExample:\n\tN = 10 # No. Sources\n\tT = 1000 # No. Samples\n\tK = 15 # No. datasets (subjects)\n\trho = [0.9,0.8,0.7]\n\n\t# Common and distinct source generation\n\tsource_mat = np.zeros((N,T,K))\n\tscv_cov_mat = np.zeros((K,K,N))\n\n\t# Common sources across K datasets\n\tfor i in range(len(rho)):\n\t\t(temp,scv_cov_mat[:,:,i]) = MGGD_generation(T,K,'uniform',rho[i],0.5)\n\t\tsource_mat[i,:,:] = temp.T\n\n\t# Common sources with sub-group structure across K datasets\n\t(temp,scv_cov_mat[:,:,len(rho)]) = MGGD_generation(T,K,'block',{'val': 0.01, 'blocks': [(0.9, 0, 3), (0.01, 3,14)]},0.5)\n\tsource_mat[len(rho),:,:] = temp.T\n\n\t# Distinct sources across K datasets\n\tfor i in range(len(rho)+1,N,1):\n\t\t(temp,scv_cov_mat[:,:,i]) = MGGD_generation(T,K,'ar',0.01,0.5)\n\t\tsource_mat[i,:,:] = temp.T\n\n\n\t# Create datasets by mixing with randomly generated mixing matrices\n\tmix_mat = np.random.randn(N,N,K)\n\tdata_mat = np.zeros((N,T,K))\n\tfor k in range(K):\n\t\tdata_mat[:,:,k] = mix_mat[:,:,k]@source_mat[:,:,k]\n\n\t# Apply CMI-IVA\n\tiva_results, Order, Corr_struct = order_selection_iva(data_mat)\n\n\t Output:\n iva_results: tuple\n -iva_results[0] = W : np.ndarray\n The estimated demixing matrices of dimensions N x N x K so that ideally\n W[k] @ A[k] = P @ D[k], where P is any arbitrary permutation matrix and D[k] is any\n diagonal invertible (scaling) matrix. Note that P is common to all datasets. This is\n to indicate that the local permutation ambiguity between dependent sources\n across datasets should ideally be resolved by IVA.\n\n -iva_results[1] = cost : float\n The cost for each iteration\n\n -iva_results[2] = Sigma_N : np.ndarray\n Covariance matrix of each source component vector, with dimensions K x K x N\n\n -iva_results[3] = isi : float\n\n Order: dict\n -'mdl': int \n Common order estimated by the minimum description length (MDL) criteria \n -'aic': int\n Common order estimated by the akaike information criterion (AIC)\n -'mdl_results': np.ndarray\n Number of subgroup in each SCV estimated by MDL (N)\n -'aic_results': np.ndarray\n Number of subgroup in each SCV estimated by AIC (N)\n\n Corr_struct: dict\n -'eig': np.ndarray\n Estimated eigenvalues for each SCV (K x N)\n -'eig_str': np.ndarray\n Estimated correlation structire in each SCV (K x K x N)\n\n## Contact\n\nakhondams@nih.gov or mo32@umbc.edu\n\n## Citing\n\nIf you use this package in an academic paper, please cite [1].\n\n @INPROCEEDINGS{9523414,\n author={Akhonda, M. A. B. S. and Gabrielson, Ben and Calhoun, Vince D. and Adali, T\u00c3\u00bclay},\n booktitle={2021 IEEE Data Science and Learning Workshop (DSLW)}, \n title={Complete Model Identification Using Independent Vector Analysis: Application to the Fusion of Task FMRI Data}, \n year={2021},\n volume={},\n number={},\n pages={1-6},\n doi={10.1109/DSLW51110.2021.9523414}}\n\n\n[1] M. A. B. S. Akhonda, B. Gabrielson, V. D. Calhoun and T. Adali,\"Complete Model Identification Using Independent Vector Analysis: Application to the Fusion of Task FMRI Data,\" 2021 IEEE Data Science and Learning Workshop (DSLW), Toronto, ON, Canada, 2021, pp. 1-6, doi: 10.1109/DSLW51110.2021.9523414.\n\n\n\n",
"bugtrack_url": null,
"license": "LICENSE",
"summary": "Implementation of CMI-IVA",
"version": "0.0.2",
"project_urls": {
"Homepage": "https://mlsp.umbc.edu/Siddique"
},
"split_keywords": [
"iva",
"model order selection",
"multiset analysis",
"common and distinct"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "171de074fd0f3c21a813e40ff0e96ed4a81d51ca7c24be58c884f71aff159b76",
"md5": "d79ff4a85971529f771493cfd4591451",
"sha256": "69399bf1d14b2da08de21b0ec1d7479a5819beeeea6d435857883eb15038da88"
},
"downloads": -1,
"filename": "iva_order_selection-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d79ff4a85971529f771493cfd4591451",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 6437,
"upload_time": "2023-05-19T14:28:36",
"upload_time_iso_8601": "2023-05-19T14:28:36.902077Z",
"url": "https://files.pythonhosted.org/packages/17/1d/e074fd0f3c21a813e40ff0e96ed4a81d51ca7c24be58c884f71aff159b76/iva_order_selection-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7085a8b67086bb6b863ca7edeb15dac89c3b8aa6699b4b39cae9ffdf8e155bc7",
"md5": "2dcc993c51aa22efeff07204b0729382",
"sha256": "7f020e6152ef5045f23d21bb2cd1281c83d4ddafa09f9069a289ab062f649a74"
},
"downloads": -1,
"filename": "iva_order_selection-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "2dcc993c51aa22efeff07204b0729382",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 5284,
"upload_time": "2023-05-19T14:28:38",
"upload_time_iso_8601": "2023-05-19T14:28:38.675252Z",
"url": "https://files.pythonhosted.org/packages/70/85/a8b67086bb6b863ca7edeb15dac89c3b8aa6699b4b39cae9ffdf8e155bc7/iva_order_selection-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-19 14:28:38",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "iva-order-selection"
}