Native Python implementation of AMICA for MNE-Python and scientific EEG workflows.
Project description
amica
amica is a native Python implementation of AMICA (Adaptive Mixture Independent Component Analysis), one of the highest-performing ICA algorithms for EEG source separation.
Originally distributed as a closed-source Fortran executable from UCSD, this implementation of amica provides an open, extensible implementation with optional JAX acceleration, seamless MNE-Python integration, and a modern Python API for reproducible neuroimaging workflows.
Status: amica is under active development and validation. The implementation already achieves numerical agreement with the original MATLAB AMICA across a broad range of configurations, while documentation and benchmarking continue to expand.
Highlights
- Native Python implementation of the AMICA algorithm
- Numerical agreement with the original MATLAB AMICA implementation
- Optional JAX backend for CPU and GPU acceleration
- Native integration with MNE-Python
- Support for multi-model AMICA
- Modern scientific Python API
- Extensive testing and continuous integration
- Fully open source (BSD-3-Clause)
Installation
Using pip
git clone https://github.com/snesmaeili/amica.git
cd amica
pip install -e .
Install optional dependencies:
pip install -e ".[jax]"
pip install -e ".[mne]"
pip install -e ".[dev]"
pip install -e ".[all]"
Using uv
git clone https://github.com/snesmaeili/amica.git
cd amica
uv venv
source .venv/bin/activate
uv pip install -e .
or
uv pip install -e ".[all]"
Quick Start
from amica import Amica, AmicaConfig
config = AmicaConfig(
max_iter=2000,
num_mix_comps=3,
)
model = Amica(config, random_state=42)
result = model.fit(data)
sources = model.transform(data)
For MNE-Python:
from amica import fit_ica
ica = fit_ica(raw)
ica.plot_components()
ica.apply(raw)
Examples
Example scripts are available in the examples/ directory, including:
- MNE-Python integration
- Native AMICA API
- JAX acceleration
- Multi-model AMICA
- HPC / SLURM execution
Documentation
Full documentation, API reference, validation experiments, and tutorials are available at
https://snesmaeili.github.io/amica/
Validation
amica has been validated against the original MATLAB AMICA implementation and achieves numerical agreement across a wide range of configurations.
The documentation contains:
- validation experiments
- numerical parity analyses
- performance benchmarks
- reproducibility instructions
Contributing
Contributions are welcome!
Please read CONTRIBUTING.md before opening a pull request.
Citation
If amica contributes to your research, please cite the original AMICA publications.
Citation metadata is available in CITATION.cff.
License
amica is distributed under the terms of the BSD 3-Clause 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
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 amica-0.0.1.tar.gz.
File metadata
- Download URL: amica-0.0.1.tar.gz
- Upload date:
- Size: 91.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc614a33882a486a69d075ac74186a16d9af35db1d30cac0abf992ac7e3ae363
|
|
| MD5 |
17e5c22d33ab20c471e9292ff7aaeaeb
|
|
| BLAKE2b-256 |
29345799e01d9052acc354c1c4a66978a09ccd70fdd1181aed9a1bdc1ee2907e
|
Provenance
The following attestation bundles were made for amica-0.0.1.tar.gz:
Publisher:
release.yml on snesmaeili/amica
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
amica-0.0.1.tar.gz -
Subject digest:
cc614a33882a486a69d075ac74186a16d9af35db1d30cac0abf992ac7e3ae363 - Sigstore transparency entry: 2028565719
- Sigstore integration time:
-
Permalink:
snesmaeili/amica@2f99ac114018dc53bd99f25da866fc4a098d158d -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/snesmaeili
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2f99ac114018dc53bd99f25da866fc4a098d158d -
Trigger Event:
release
-
Statement type:
File details
Details for the file amica-0.0.1-py3-none-any.whl.
File metadata
- Download URL: amica-0.0.1-py3-none-any.whl
- Upload date:
- Size: 66.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ce5897f75aab3a631d640ed97f9e129edafd262db5d75bb002183c06debafc9
|
|
| MD5 |
36e00db9269384b0d0e79bd41952476a
|
|
| BLAKE2b-256 |
0a9292cd06ce4689fa95e496658cca5588d7768ffad664a3e67d40150615c570
|
Provenance
The following attestation bundles were made for amica-0.0.1-py3-none-any.whl:
Publisher:
release.yml on snesmaeili/amica
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
amica-0.0.1-py3-none-any.whl -
Subject digest:
0ce5897f75aab3a631d640ed97f9e129edafd262db5d75bb002183c06debafc9 - Sigstore transparency entry: 2028565828
- Sigstore integration time:
-
Permalink:
snesmaeili/amica@2f99ac114018dc53bd99f25da866fc4a098d158d -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/snesmaeili
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2f99ac114018dc53bd99f25da866fc4a098d158d -
Trigger Event:
release
-
Statement type: