Skip to content

pyAMICA 0.1.0

Choose a tag to compare

@neuromechanist neuromechanist released this 11 Jul 16:38
6a5e158

First public release of pyAMICA, a Python (PyTorch) implementation of Adaptive Mixture Independent Component Analysis (AMICA) that reproduces the reference Fortran implementation within numerical tolerance.

Highlights

  • Fortran parity on real EEG: single-model log-likelihood ~ -3.40 (reference -3.4018), Hungarian-matched component correlation ~ 0.997; source-density score functions bit-exact to ~1e-15.
  • Backends: CPU, NVIDIA GPU (CUDA), and Apple GPU (MLX). float64 for parity, float32 for speed (MLX is the fastest option on Apple Silicon).
  • Full algorithm: all five source-density families, mixture of ICA models, positive-definite Newton updates, component sharing, and outlier rejection.
  • EEGLAB drop-in output: write_amica_output writes the loadmodout15 binary format and variance_order gives the EEGLAB back-projected-variance component order (IC1 = highest), so a run loads directly in EEGLAB.
  • scikit-learn-style AMICA interface, model save/load, and a documentation site.
  • Benchmarks: spatially-distributed channel-subset selection and a data-size (k-factor) cross-backend equivalence sweep.

Validation

Correctness is defined as parity with the reference Fortran binary and is validated on real sample EEG, never synthetic data. See the documentation for the full validation and backend-selection guides.

Install

git clone https://github.com/sccn/pyAMICA.git
cd pyAMICA
uv sync