mne-tools / mne-tools/mne-python

Parameter "reject" in ica.fit for epoch data object

Open
#7,773 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.5k
Forks
1.6k
Avg merge
1d 6h
Merged PRs (30d)
100

Description

Hi,

this issue encompasses both MNE and autoreject.

In Autoreject Issue#170 and in the MNE API page is reported that the reject parameter for ica.fit can only be applied on a raw object.
However, in some cases, it would be benefitial do so directly on epochs, so @eioe and I were wondering whether there was a specific reason behind this choice? Do you think it would be possible to include the rejection parameter for epoch objects as well?

The question is mainly motivated by the fact that an ICA fitted on epoched data - that contain blinks/eye movements but where bad samples are ignored via the reject parameter - should provide a better decomposition compared to one fitted directly on continous "dirty" data. In our experience, removing intertrial intervals before ica fitting, drastically improves ica decomposition and leads to cleaner eye-components. It would be great to further improve upon this by also ignoring those of the remaining samples which are clearly artifactual (e.g., determined by a cut-off threshold).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with mne.preprocessing.ICA.fit and the documented reject behavior, then review Autoreject issue #170 for context. Determine how rejection should apply to epoch data and what compatibility or behavior constraints exist; done means the requested epoch support is implemented and documented with suitable validation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.