[Eeglablist] interpolating boundary events

Scott Makeig smakeig at gmail.com
Sun Mar 9 08:35:08 PDT 2025


Gin -

Yes, in constructing EEGLAB we were careful to mark boundary events, and to
have core routines (e.g. filtering) respect them (by not filtering through
the jagged discontinuity each can create).

ICA decomposition, in particular, pays no attention to the time ordering of
the data. In fact, it randomly shuffles their order before each training
iteration (while, of course, not affecting the original order of the data
points in the EEG dataset). While it is advantageous to decompose as much
data as possible, this data should have been while the participant remained
in the same condition or cognitive state - and should *not* include
interpolated data, which will tend to 'confuse' the decomposition.

The question as to the consistency of the cognitive state of the subject
during the recording is an important one. Generally, if the participant
performs the same task throughout the ICA training data, with generally
similar performance, then we can imagine their cognitive state to have
remained largely the same. If you want to investigate this - or want to
decompose data in which cognitive state is not or may not be maintained
(sleep, drowsy performance, different tasks, eyes open vs. eyes closed,
etc.), EEGLAB includes a powerful ICA algorithm for assessing this - AMICA.
See papers by Shawn Hsu (+ Makeig) for examples of the power of AMICA to
discern changes in cognitive state.

Also, you might investigate the *EEG.urevent* structure, which retains
markers of all recorded event onsets in the original (*ur*) recording.

Scott

On Sat, Mar 8, 2025 at 6:42 PM Gin Estrella Cruz <g.estrella.cruz at gmail.com>
wrote:

> Hi Scott,
>
> I initially thought interpolating short boundary events was needed to
> maintain a strictly continuous dataset for my subsequent analyses like ICA
> or PSD. But I’ve since found out that EEGLAB typically skips or removes
> those intervals automatically, so interpolation is often unnecessary. I
> tried cubic spline interpolation across the short gaps and I got flat
> lines, so bridging gaps with artificial data would seem to distort
> subsequent analyses. Therefore, I no longer plan to interpolate short
> boundary events unless I’m running a method that explicitly requires a
> single unbroken time series (like nonlinear time series methods), but even
> then, I may just split the data into segments, removing the boundary gaps.
> By the way, I am trying to do a fusion of EEG with resting-state fMRI.
>
> And thanks to EEGLAB and its developers -- such a wonderful tool!
>
> -Gin
>
> On Sun, Mar 9, 2025 at 3:07 AM Scott Makeig <smakeig at gmail.com> wrote:
>
>> Gin -
>>
>> Why would you want to do that?
>>
>> Scott Makeig
>>
>> On Wed, Mar 5, 2025 at 8:39 PM Gin Estrella Cruz via eeglablist <
>> eeglablist at sccn.ucsd.edu> wrote:
>>
>>> Hi everyone,
>>>
>>> What is the current consensus on interpolating across boundary events?
>>> Which algorithm or EEGLAB plug-in would you recommend?  I plan to
>>> interpolate across a threshold of no longer than 2-seconds of boundary
>>> event interval.
>>>
>>> I'd appreciate your help.
>>>
>>> Thanks,
>>> Gin Cruz
>>> _______________________________________________
>>> To unsubscribe, send an empty email to
>>> eeglablist-unsubscribe at sccn.ucsd.edu or visit
>>> https://sccn.ucsd.edu/mailman/listinfo/eeglablist .
>>>
>>
>>
>> --
>> Scott Makeig, Research Scientist and Director, Swartz Center for
>> Computational Neuroscience, Institute for Neural Computation, University of
>> California San Diego, La Jolla CA 92093-0559, http://sccn.ucsd.edu/~scott 
>>
>

-- 
Scott Makeig, Research Scientist and Director, Swartz Center for
Computational Neuroscience, Institute for Neural Computation, University of
California San Diego, La Jolla CA 92093-0559, http://sccn.ucsd.edu/~scott 


More information about the eeglablist mailing list