thanks Richard,
I removed now the “reject = dict(mag=5e-12, grad=4000e-13)” from ICA. I had this doubt too, but I noted that “keeping it” versus “removing it” produced a lower percentage of epochs rejected (throught the “autoreject” method) as showed by my results in the first post of this thread, for instance:
ICA, CAR = 2.2% epochs rejected (with the “reject” parameter in the ICA enabled)
ICA, CAR = 61% epochs rejected (with the “reject” parameter in the ICA disable)
I removed “decim” as well now. I read from the documentation that it helped to speed up the process, but I’ve just tested now the ICA without it and I could not note any reduction in speed. So I’m totally agree with you that it is not necessary, at least in my case.
I’ve updated the baseline values according to the documentation as follows: baseline=(-0.5, -0.2))
According to what you said, after the ica.fit(epochs) I manually inspect the components as follows:
ica.plot_components()
ica.plot_sources(epochs)
After the above stage, I already can see which component is associated to the ocular activity, and I could therefore easily remove it using e.g. ica.exclude = [0].
I already test it, and it well cleans the ocular activity from epochs.
So I’m wondering why I should use also the following lines:
eog_epochs = mne.preprocessing.create_eog_epochs(raw_filtered, ch_name="Fp1", baseline=(-0.5, -0.2))
eog_indices, eog_scores = ica.find_bads_eog(eog_epochs, ch_name="Fp1")
ica.exclude = eog_indices
Looking at the documentation , the approach associated to the above 3 lines looks great in case you want “automatically mark for exclusion any ICs that match the EOG/ECG pattern”.
On the other hand “you must hope that the frontal EEG channels only reflect EOG and not brain dynamics in the prefrontal cortex (or you must not care about those prefrontal signals)”… and in my case I’m focusing exactly only in frontal brain activity (I’ve only 7 frontal channels).
In general I would love to use “ica.find_bads_eog” for the following automatic exclusion of the components, but my test showed that “MNE didn’t manage to extract an IC related to ocular activity” using “Fp1”. Afterwards, if the only solution would be playing with the “threshold” parameter (I did it and I got the component [0] setting the threshold to 1.7) , but my main concern is that the analysis will turn manual again, so why not simply inspect and remove the components manually without using the above 3 lines of code?
However, since I guess would be great for anybody to integrate an automatic approach as well, I’m wondering if could be possibile to use the approach described below order:
- run the ica.fit on epochs
- get the eog epochs (e.g. eog_epochs = mne.preprocessing.create_eog_epochs(raw_filtered, ch_name=“Fp1”, baseline=(-0.5, -0.2)))
- get the eog_indices (e.g. eog_indices, eog_scores = ica.find_bads_eog(eog_epochs, ch_name=“Fp1”)
- At this stage, if the eog indices list is empty, I could implement a code in order to automatically lower the “threshold” of “ica.find_bads_eog” till the script won’t return at least one ocular component.
- the default threshold is set to 3.0. If the code found at least one ocular component with the threshold set between 1.5 and 3.00 (decreasing the threshold value from 3.00 in step of 0.10) then the ocular component is removed automatically. Otherwise, If the threshold is lowered by the script to a value lower than 1.5, than the code require the manual inspection ( visually select and manually remove the component)
What do you think about the above approach?
Off course “1.5” threshold limit for the manual inspection is just a sample value. Could you let me know a value that “make sense”, to replace to "“1.5”? I don’t know if it is too low (I checked the documentation but I could not find any details about that).
Thanks for keeping this forum so stimulating!