Order in preprocessing and different filters before and after ICA

  • MNE version: 1.7.0
  • operating system: Windows 11

Hello, I wanted to ask in this post about the relationship abouth highpass filters and ICA(fit and apply).

I know that ICA should be applied on 1 hz (or higher) high pass filtered data, as recomendded in MNE tutorials, and other papers. My question is basically**, can you fit ICA on 1 hz highpass filtered epochs** , and then apply it to raw (no filter at all, no epochs) and then highpass filter again (this time at 0.1hz or other values).

I have seen some posts about it like Filter low-pass and high-pass for EOG artifac correction with ICA but I don´t get a clear picture

Basically my pipeline is:

  • highpass/lowpass filtering (1-40) hz
  • epoching of 2 seconds
  • removal of artifacts with autoreject (of 2 second epochs)
  • ICA fit on epochs [without epoch removed by autoreject] (
  • ICA apply on RAW signal
  • 2Âş - highpass/lowpass filtering (0.5-40) hz
  • re-epoching (38 seconds now, i work with very long epochs)
  • autoreject on 38 s epochs

Thanks in advance! Please let me know if you want the code I used or any other information

Hello, yes, this seems reasonable to me!

Best wishes,
Richard

1 Like

Okey thanks so much Richard!

I would like to ask, why filtering AFTER applying ICA, rather than BEFORE applying it , i don´t really understand the reasons behind that decision (although people always do it after filtering), shouldn´t it be the same?

Hello, I’m sorry, I actually mis-read parts of your suggested proposal above (I responded on my phone while changing trains … maybe not the best strategy!)

May I ask why you want to apply ICA on your continuous data before filtering, if you want to later epoch your data anyway? Why not filter the raw data, epoch it (to receive “dirty” epochs), apply ICA & auto reject (to receive “clean” epochs)?

Best wishes,
Richard

[quote=“dbo97, post:1, topic:11180”]

Hello Richard,
Thanks so much for your answer.

Yes that´s also a possible pipeline, although i thought that there wasn´t any difference in that regard (when to apply ICA).
So let´s summarize everything to clarify things

Basically my pipeline would be:
1Âş round of preprocessing

  1. highpass/lowpass filtering (1-40) hz
  2. epoching of 2 seconds
  3. removal of artifacts with autoreject (of 2 second epochs)
  4. ICA fit on epochs of 2 seconds [without epoch removed by autoreject]

Second round of preprocessing
5. Now go back to raw data
6. re-epoching (38 seconds now, i work with very long epochs)
7. 2Âş - highpass/lowpass filtering (0.5-40) hz on epochs (38 seconds now!)
8. ICA apply on 38 s epochs
9. autoreject on 38 s epochs

So, if we follow this way, i wonder if step 4 is okey? "ICA fit on epochs of 2 seconds [without epoch removed by autoreject] "

Should I create 38 seconds epoch after applying autoreject by joining the 2s epochs and nans (instead of the epochs removed by autoreject)

This is, add a new step of creating 38 s epochs , and fitting the ICA on those 38s seconds (good epochs + nans)

I hope to have explained myself clearly, please tell me if you need anything else from me!

Hello Richard,
I re-post my answer, i think i answered myself, instead of you. Sorry, I´m new in forums of coding :slight_smile:

Thanks so much for your answer.

Yes that´s also a possible pipeline, although i thought that there wasn´t any difference in that regard (when to apply ICA).
So let´s summarize everything to clarify things

Basically my pipeline would be:
1Âş round of preprocessing

  1. highpass/lowpass filtering (1-40) hz
  2. epoching of 2 seconds
  3. removal of artifacts with autoreject (of 2 second epochs)
  4. ICA fit on epochs of 2 seconds [without epoch removed by autoreject]

Second round of preprocessing
5. Now go back to raw data
6. re-epoching (38 seconds now, i work with very long epochs)
7. 2Âş - highpass/lowpass filtering (0.5-40) hz on epochs (38 seconds now!)
8. ICA apply on 38 s epochs
9. autoreject on 38 s epochs

So, if we follow this way, i wonder if step 4 is okey? "ICA fit on epochs of 2 seconds [without epoch removed by autoreject] "

Should I create 38 seconds epoch after applying autoreject by joining the 2s epochs and nans (instead of the epochs removed by autoreject)

This is, add a new step of creating 38 s epochs , and fitting the ICA on those 38s seconds (good epochs + nans)

I hope to have explained myself clearly, please tell me if you need anything else from me!