[Eeglablist] ICA pipeline questions

Tarik S Bel-Bahar tarikbelbahar at gmail.com
Tue Sep 12 07:18:50 PDT 2017

*regarding dropping channel to fix rank instead of using PCA flag in
runica, drop any channel as you have enough of a high-density setup. If one
had to choose, something that is usually noisy and not so useful, such as
lowest channel on the left or right edge of the cap near the ear.
Alternatively find the noisiest one and drop that.

*not sure about your PREP reref before ICA.  You have to trust what PREP
developers suggest, or make your own decisions based on your (growing) EEG
wisdom. I would say
a) use the reref data from prep
b) run ICA
c) then interpolate channels and dont reref again.


a) use the data from prep before it is rereferenced
b) run ICA
c) then reref, then interpolate

The difference in the two steps above is about whether or not the
researcher thinks that ICA needs rereferenced data or not. I recommend
reref before ICA (but, again, don't interpolate before ICA).

you need to see for yourself by comparing the ICA results quality, and your
final EEG metrics, when doing things in several versions of your pipeline,
and then make best possible decision about a final pipeline to use.

The Data Analyst (you) must feel comfortable reviewing different pipelines
affect ICA results and final EEG metrics :)
This is not programming of just numbers, these are biosignals from humans,
and require due diligence :)

Best wishes!

ps. make sure you're grabbing the right things from PREP. Do feel
comfortable taking data from specific steps within PREP. Do feel
comfortable checking with PREP developers when you are not 100% sure if
you're taking the right data result from a particular PREP step.

pps. once you have a working pipeline, considering sharing your final steps
and code with the eeglablist.

On Tue, Sep 12, 2017 at 12:14 AM, Samran <samranasghar at gmail.com> wrote:

> Hi Tarik,
> Thanks a lot for the detailed response. Really helpful. :)
> *The data is not PREPed again, it's the same data loaded in step1 of the
> pipelines. It was not clear earlier.
> *It seems reasonable to move downsampling at step2. It will likely reduce
> the filtering time as well.
> *You have suggested to drop a channel, instead of using PCA. Can you
> please recommend the criteria for selection of channel to be dropped, or it
> can be any channel? As per Makoto's pipeline, it is reasonable to drop the
> reference channel, but the data I have is not referenced. Although I can
> reference it to a particular channel offline in EEGLAB, but I would like to
> go with average reference, as given by PREP pipeline.
> *Do you have any suggestions of using ICA with PREP pipeline (because of
> the interpolation step)? Here's what I have come up with: Use PREP pipeline
> to clean_line and identifying the bad channels. For ICA, use the
> clean_lined data having only the good channels (chans_G) referenced to the
> average of chans_G. After removing bad ICs (and rejecting any leftover bad
> epochs), interpolate and average reference the data. However, I think the
> data will not be referenced to the 'true' average now, one of the targets
> of PREP, since good channels were already referenced to average of chans_G.
> Is there a better way of doing ICA with PREP?
> Thanks.
> On Tue, Sep 12, 2017 at 7:22 AM, Tarik S Bel-Bahar <
> tarikbelbahar at gmail.com> wrote:
>> Some followup points here for your Samran:
>> 1. many researchers use and trust near fully automatic or fully automatic
>> pipelines. See for example TAPEEG. It really depends on their biases (e.g.,
>> being programmers/engineers versus EEG researchers) and their needs (e.g.,
>> having dozens versus thousands of files). Further, automated pipeleines can
>> be tweaked to your satisfaction, and can also provide "quality metrics" to
>> know when there are issues in the pipeline.
>> 2. Your "Drop artifactual ICs" step can be complex. Some researchers only
>> keep neural ICs, some researchers only remove artifactual ICs, some
>> researchers fully trust the results of ICA classifcation plugins such as
>> Adjust, MARA, IC-MARA, and SASICA. If you haven't had a chance to use/test
>> the results form those plugins, please be sure to do so.
>> 3. If you haven't had a chance to yet, make sure to avail yourself of the
>> excellent IC classification site from Luca at the following link. I usually
>> recommend to students and beginners to do at least 500 classifications
>> there.
>> http://reaching.ucsd.edu:8000/tutorial/overview
>> On Mon, Sep 11, 2017 at 11:55 AM, Tarik S Bel-Bahar <
>> tarikbelbahar at gmail.com> wrote:
>>> Hello Samran, here's notes for you below, good luck on your eeg
>>> adventures!
>>> ******NOTES FOR SAMRAN********
>>> *you need to understand/know exactly what PREP is doing, and if you want
>>> comments on that, you should list the steps you think PREP is doing.
>>> *your pipeline 1 seems okay. One can drop channels instead of PCA.
>>> *Note It's generally not recommended to interpolate channels before ICA.
>>> *Not sure why you are running PREP again (I guess it's okay if it does
>>> exactly the same thing as earlier.
>>> *Reject epochs at step 13 after reviewing the data, unless for some
>>> reason you trust that A) you have removed all artifactual ICs and B) there
>>> are no remaining artifactual periods in the epoched data
>>> *In your Pipeline 2, it's up to users whether or not they run a second
>>> ICA after pruning the data of Bad ICs. I would not recommend that, but you
>>> can look in past eeglablist answers, and in Makoto's processing
>>> suggestions, and in publications using ICA for EEG.
>>> *Double check that you don't need to move the resampling to the be first
>>> or second step.
>>> Your question #1
>>> ***ICA in eeglab does not care if there are discontinuities in the data,
>>> so it does not matter if you give it continuous data with breaks, or
>>> epoched data. It mixes up the time points and focuses on spatial patterns
>>> (not temporal patterns).
>>> your question #2
>>> I've specified above that the Data Analyst (you) needs to be sure there
>>> is no dirty data going into your averages and metrics. That is regardless
>>> of whether or not you already pruned your data by rejecting ICs. Be careful
>>> to NOT DO everything automatically until you have checked the results of
>>> your pipelines (at the epoch level and averaging level), and your are sure
>>> really sure that you don't need to go extra cleaning after bad IC rejection.
>>> In short, there may still be dirt in the data after rejecting
>>> artifactual ICs. You need to personally check whether there is or is not
>>> remaining dirt in the data, and you need to be careful not to "assume" that
>>> things are working, but rather "check fully" that things are working.
>>> Your question #3b
>>> The PCA correction is correct. Personally I've had better success with
>>> "dropping a channel before ICA to account fix average referencing's drop in
>>> rank" instead of the PCA flag in runica. In other words, after average
>>> referecing, and before ICA, I drop 1 channel rather than use the PCA
>>> reduction.
>>> Your Question $3b
>>> Don't interpolate before ICA.
> --
> Regards,
> M. Samran Navid.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20170912/8bec2ce0/attachment.html>

More information about the eeglablist mailing list