# Preprocessing EEG: Filters, Artifact Removal Methods and their parameters

**URL:** <https://mne.discourse.group/t/preprocessing-eeg-filters-artifact-removal-methods-and-their-parameters/6317>\
**Category:** Support & Discussions\
**Tags:** preprocessing, eeg, frequency-filter\
**Created:** [February 9, 2023, 1:56am UTC](https://mne.discourse.group/t/preprocessing-eeg-filters-artifact-removal-methods-and-their-parameters/6317 "2023-02-09T01:56:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![poorva31](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/poorva31/32/738_2.png) [@poorva31](https://mne.discourse.group/u/poorva31)\
**Post date:** [February 9, 2023, 1:56am UTC](https://mne.discourse.group/t/preprocessing-eeg-filters-artifact-removal-methods-and-their-parameters/6317/1 "2023-02-09T01:56:36Z")

</div>

- MNE version: 1.2.3
- operating system: Windows 11

I am currently working on an EEG dataset with 5 EEG channels, 2 EOG channels, and 1 ECG channel collected from over 100 participants. I have some questions about preprocessing these signals:

1. For removing artifacts, one of the methods I tried was by using **ICA** and manually labeling the bad components. But this is very time-consuming.  
Since there are very few EEG channels, is there a function in mne-python to compute ICA by **MAICA** (Moving-average ICA)?

2. In an effort to automate artifact removal, I tried using MNE’s find\_bads\_ecg and find\_bads\_eog. But it does not work well with the default threshold. I could find a suitable threshold after a lot of trial and error. Is there a way to formulate/automate how the **threshold should be set** for the best results?

3. Are there any other methods to **automate** the artifact removal process using the EOG and ECG signals?

4. What parameters should be considered while choosing the value for the **notch filter** and the **bandpass filter** , and how to determine/ **calculate** them?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![cbrnr](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/cbrnr/32/1409_2.png) [@cbrnr](https://mne.discourse.group/u/cbrnr)\
**Post date:** [February 9, 2023, 6:35am UTC](https://mne.discourse.group/t/preprocessing-eeg-filters-artifact-removal-methods-and-their-parameters/6317/2 "2023-02-09T06:35:29Z")

</div>

Re 1. No, MNE does not include that kind of ICA. You have very few channels for ICA anyway, and unless MAICA takes care of that (I have never heard of MAICA so I cannot tell), you should use other algorithms that are not based on ICA.

Re 2. and 3., you might want to try [autoreject](https://autoreject.github.io/stable/index.html).

Re 4., are you sure you need a notch filter? Usually, filtering out line noise is only useful for visualizing the continuous data, but unless your analysis requires the frequency band of the line noise (either 50 or 60Hz), you don’t need to filter it out. If you need that frequency band, you could try things like `mne.filter.notch_filter()` with `method="spectrum_fit"`, ZapLine, or CleanLine (which are available e.g. [here](https://nbara.github.io/python-meegkit/auto_examples/example_dss_line.html)).

---

<div class="post-metadata">

**Author:** ![poorva31](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/poorva31/32/738_2.png) [@poorva31](https://mne.discourse.group/u/poorva31)\
**Post date:** [February 9, 2023, 10:31pm UTC](https://mne.discourse.group/t/preprocessing-eeg-filters-artifact-removal-methods-and-their-parameters/6317/3 "2023-02-09T22:31:28Z")

</div>

Thanks, @cbrnr for the answer! I will try these solutions.

---

<div class="post-metadata">

**Author:** ![wmvanvliet](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/wmvanvliet/32/100_2.png) [@wmvanvliet](https://mne.discourse.group/u/wmvanvliet)\
**Post date:** [September 30, 2023, 10:49am UTC](https://mne.discourse.group/t/preprocessing-eeg-filters-artifact-removal-methods-and-their-parameters/6317/4 "2023-09-30T10:49:50Z")

</div>

Instead of ICA, I think your setup is more appropriate for a regression approach: [Reduce EOG artifacts through regression — MNE 1.5.1 documentation](https://mne.tools/stable/auto_examples/preprocessing/eog_regression.html)

It’s also more automated as there are no thresholds to be set
