Skip to content

Commit

Permalink
Added "picard-extended_infomax" ICA algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
hoechenberger committed Oct 30, 2023
1 parent 327cb94 commit a811ac0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/source/v1.5.md.inc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- Improved logging of coregistration distances (#769 by @larsoner)
- Input validation has been improved by leveraging [pydantic](https://docs.pydantic.dev) (#779 by @larsoner)
- Reduced logging when reports are created and saved (#799 by @hoechenberger)
- Added [`"picard-extended_infomax"`][mne_bids_pipeline._config.ica_algorithm] ICA algorithm to perform "extended Infomax"-like ICA decomposition using Picard (#801 by @hoechenberger)

[//]: # (### :warning: Behavior changes)

Expand Down
8 changes: 6 additions & 2 deletions mne_bids_pipeline/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1258,9 +1258,13 @@
```
"""

ica_algorithm: Literal["picard", "fastica", "extended_infomax"] = "picard"
ica_algorithm: Literal[
"picard", "fastica", "extended_infomax", "picard-extended_infomax"
] = "picard"
"""
The ICA algorithm to use.
The ICA algorithm to use. `"picard-extended_infomax"` operates `picard` such that the
generated ICA decomposition is identical to the one generated by the extended Infomax
algorithm (but may converge in less time).
"""

ica_l_freq: Optional[float] = 1.0
Expand Down
3 changes: 3 additions & 0 deletions mne_bids_pipeline/steps/preprocessing/_06a_run_ica.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ def fit_ica(

if algorithm == "picard":
fit_params = dict(fastica_it=5)
elif algorithm == "picard-extended_infomax":
algorithm = "picard"
fit_params = dict(ortho=False, extended=True)
elif algorithm == "extended_infomax":
algorithm = "infomax"
fit_params = dict(extended=True)
Expand Down
1 change: 1 addition & 0 deletions mne_bids_pipeline/tests/configs/config_ds003392.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

# Artifact correction.
spatial_filter = "ica"
ica_algorithm = "picard-extended_infomax"
ica_max_iterations = 500
ica_l_freq = 1.0
ica_n_components = 0.99
Expand Down

0 comments on commit a811ac0

Please sign in to comment.