ENH: Add JAMICA as an ICA method - #14247
Open
snesmaeili wants to merge 5 commits into
Open
Conversation
snesmaeili
requested review from
agramfort,
drammock,
larsoner and
mscheltienne
as code owners
August 28, 2026 21:13
|
Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴 |
larsoner
reviewed
Aug 29, 2026
larsoner
left a comment
Member
There was a problem hiding this comment.
Just two tiny tweaks then I think we can merge!
| self.n_iter_ = n_iter + 1 # picard() starts counting at 0 | ||
| del _, n_iter | ||
| elif self.method == "jamica": | ||
| from jamica import amica |
Member
There was a problem hiding this comment.
You should use _soft_import, it raises a nice error than a bare ImportError
| assert amari_distance < 0.1 | ||
|
|
||
|
|
||
| def test_ica_jamica_missing_dependency(monkeypatch): |
Member
There was a problem hiding this comment.
I don't think we need this one, we can trust _safe_import to do the right thing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference issue (if any)
Related to #14207.
What does this implement/fix?
Adds
method="jamica"as an optional, single-model ICA backend using the publicjamica.amicaAPI from JAMICA 0.3.0. MNE retains ownership of pre-whitening, PCA, dimension selection, reconstruction, and persistence; multi-model AMICA remains available through JAMICA directly.The tests cover the external-solver matrix contract, deterministic direct-call equivalence, iteration metadata, optional-dependency handling, multi-model error propagation, source reconstruction, and FIF round trips without JAMICA installed.
JAMICA backend release: https://github.com/snesmaeili/jamica/releases/tag/v0.3.0
Additional information
Validation included the complete ICA test module, focused integration tests against the published JAMICA 0.3.0 package, configuration and docstring tests, pre-commit checks, and wheel/sdist validation.
AI assistance disclosure: OpenAI Codex was used to inspect both codebases, help implement the integration and tests, and run validation. I reviewed and approved the resulting changes before submission.