Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights...

42
Evaluating ICs EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton Evaluating ICA Components

Transcript of Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights...

Page 1: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Evaluating ICs

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 2: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

ICA weights in EEG structure

* *

EEG.icawinv = inv(EEG.icaweights * EEG.icasphere)

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 3: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Applying ICA weights to EEG data

EEG.icaweights

*

EEG.icasphere

EEG.data

EEG.icaact

matrix

multiplication

ch

an

nels

channels

frames

ch

an

nels

ch

an

nels

frames

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 4: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Applying ICA weights to EEG data

Note: .wts and .sph not saved as separate files by EEGLAB,

you must save them yourself:

floatwrite(EEG.icaweights,'C:\MyDirectory\ICA.wts');

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 5: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Applying ICA weights to EEG data

Same for sphering matrix

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 6: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Evaluating ICs

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 7: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Plot ICA scalp maps

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 8: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Single-dipole projections

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 9: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Compare 'good' and 'bad' scalp maps

chaotic gradients

no clear patterns

INconsistent with single dipoles

smooth gradients

concentric rings (when radial)

consistent with single dipoles

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 10: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Evaluating ICs

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 11: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Scroll component activities

Time periods that are not independent across ICs

should be removed and ICA run again for better decomposition

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 12: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Plot component power

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 13: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Plot component power

6

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 14: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Component ERPs

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 15: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Component ERP image

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 16: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

ERP Image basics

Trial 1

Trial 2

Trial 3

Trial 4

ERP Image

by default, sorted by

time-on-task

(1st trial, 2nd trial, ...)

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 17: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

ERP Image basics Trial 1:

Trial 2:

.

.

.

+

-

+

-

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 18: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

ERP Images: smoothing across trials

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 19: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Evaluating ICs

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 20: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Plot ICA component properties

Trial 4

Trial 1

Trial 2

Trial 3

ERP Image

Does not require

epoched dataset,

but ERP image

will be less

informative

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 21: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Reviewing component properties

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 22: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Component scalp maps/properties

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 23: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Eye blink component

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 24: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Eye blink component

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 25: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Lateral eye movement

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 26: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Muscle

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 27: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 28: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Brain ICs

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 29: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

more brain ICs

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 30: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Pulse artifacts

periodic spiking behavior

Often 2 peaks

between 5 and 10 Hz

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 31: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Exercise

• ALL

- Load stern.set (continuous data, contains ICA weights)

• Novice

- Plot IC scalp maps

- Scroll the IC activations and compare to channel data scroll

- Identify “artifact” ICs

> How can you be sure it is an artifact?

• Intermediate / Advanced

- Practice saving EEG.icaweights and EEG.icasphere as .wts

and .sph files and re-apply the weights again to stern.set

- Plot IC power, try different parameters from the GUI

- From supplementary material, try automatic data epoch

rejection.

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 32: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Supplementary lessons

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 33: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Auto-reject data epochs

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 34: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Reject data epochs

visual

inspection

probability

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 35: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Reject data epochs

Number of epochs

above threshold

indicated here

32 Start by clicking

Calculate:

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 36: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Reject or retain marked epochs

32

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 37: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Reject marked epochs

>> EEG = pop_jointprob(EEG,1,[1:70],5,5,0,0);

>> EEG = pop_rejepoch(EEG,find(EEG.reject.rejglobal),0);

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 38: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Select epochs

>> EEG = pop_selectevent(EEG,'type',{‘in'},...

'deleteevents', 'off','deleteepochs','on');

>> [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG,EEG,4,...

'setname','faces only epochs'); EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 39: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Select epochs with specific events

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 40: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Repeat for ‘out-of-set’ responses

Save without overwriting and go back to all epochs

Repeat process for ‘out’ trials

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 41: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Separate datasets with different conditions

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components

Page 42: Evaluating ICs - University of California, San DiegoApplying ICA weights to EEG data EEG.icaweights * EEG.icasphere EEG.data EEG.icaact matrix multiplication els channels frames els

Explanation of "sphering"

For more explanation, see:

http://sccn.ucsd.edu/~arno/indexica.html

and http://sccn.ucsd.edu/wiki/Linear_Representations_and_Basis_Vectors

"Sphering":

Remove channel

correlations

Equal variance

on both (all) axes

Original data

Sphered data

Like ICA, sphering is also a linear

operation, so re-projecting to original

space simply requires multiplying

with weight matrix

EEGLAB Workshop, June 16-18, 2012, Beijing, China: Julie Onton – Evaluating ICA Components