Independent Component Clustering Why cluster components EEGLAB studysets
Independent Component Clustering • Why cluster components? • EEGLAB studysets: the STUDY structure • Creating a STUDY – pop_createstudy() • Preparing the clustering measures – pop_preclust() • Performing the clustering – pop_clust() • Reviewing the results – pop_clustedit() • Cluster editing – pop_clustedit() • Hierarchical clustering • Signal processing cluster activities – cls_envtopo() • Clustering example – STUDY of 5 datasets EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 1
Why cluster components? • ICA transforms the data from a channel basis (activity recorded at each channel) • to a component basis (activity computed at each independent spatially-filtered cortical or non-cortical component process). • Normally, EEG researchers assume that electrode, say F 7 == F 7. . . in each subject – and then ‘cluster‘ their data by channel. . . • But this is only roughly correct! EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 2
Example: First Subject Electrode F 7 Cortex ∑ IC 2 Scalp ICs IC 3 IC 1 IC 4 EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering S. Makeig, 20053
Second Subject Electrode F 7 Cortex ∑ IC 2 Scalp ICs IC 3 IC 1 IC 4 EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering S. Makeig, 20054
Third Subject Electrode F 7 Cortex ∑ IC 2 Scalp ICs IC 3 IC 1 IC 4 EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering S. Makeig, 20055
Fourth Subject Electrode F 7 Cortex ∑ IC 2 Scalp ICs IC 3 IC 1 IC 4 EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering S. Makeig, 20056
Largest 30 independent components (single subject) EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 7
So how to cluster components? The same problems hold for clustering independent components Across Ss, components don’t even have “the same” scalp maps! Are “the same” components found across subjects? • What should define “the same” (i. e. , “component equivalence”)? • Similar scalp maps? • Similar cortical or 3 -D equivalent dipole locations? • Similar activity power spectra? • Similar ERPs? • Similar ERSPs? • Similar ITCs? • OR …, Similar combinations of the above? … EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 8
Does the spatial distribution of independent components depend on the task the subject performs? i. e. Do “the same” components (and clusters) appear for every task? EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 9
Equivalent dipole density Sternberg letter memory task EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering Onton et al. , 2005 10 Onton et al. , ‘ 05
Equivalent dipole density Letter twoback with feedback EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering Onton et al. , 2005 11 Onton et al. , ‘ 05
Equivalent dipole density Auditory oddball plus novel sounds EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering Onton et al. , 2005 12 Onton et al. , ‘ 05
Equivalent dipole density Emotion imagery task EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering Onton et al. , 2005 13 Onton et al. , ‘ 05
Equivalent dipole density Exp I Word memory (old/new) task EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering Onton et al. , 2005 14 Onton et al. , ‘ 05
Equivalent dipole density Exp II Visually cued button press task EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering Onton et al. , 2005 15 Onton et al. , ‘ 05
… Some caveats Here, • The electrode locations were not individualized. • MR images were not available co-registration crude. • Single versus dual-dipole model selection was subjective. • Different electrode montages possible location effects Onton, 2005 EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 16
Clustering by spectra (1 subject) EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 17 Makeig et al. , unpublished
Visual Selective Attention Task 15 subjects EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 18
EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 19
Clustering ICA components by eye Left mu Right mu EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 20 Makeig et al. , submitted
Semi-automated clustering • Clustered components from 15 Ss using a ‘component distance metric’ incorporating differences between their (weighted) scalp maps, dipole locations, spectra, ERP, ERSP, and ITC patterns. • Hand-adjusted clusters to remove outliers. • Determined time/frequency regions of significant ERSP and ITC for each component using permutation-based statistics. • Used binomial statistics to highlight time/frequency regions significantly active within clusters. EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 21
60 ΘFC LC + mean - N 1 Component Clusters Relative Power (d. B) 50 9 Ss 40 11 Comp 60 13 Ss 23 Comp μLC μRC CM 50 40 60 8 Ss 9 Comp 10 Ss 13 Comp 9 Ss 15 Comp αCP αLP αRP 50 8 Ss 40 12 Comp 10 20 9 Ss 11 Comp 10 11 Ss 17 Comp 20 Frequency (Hz) 10 20 EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component. Makeig Clustering 22 et al. , Science 2002
EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 23
EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 24
EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 25
EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 26
EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 27
Complex event-related dynamics underlie ‘the’ P 300 EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 28
Distributed theta burst event - brainmovie 3 d() EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 29
A FM cluster during working memory Onton. Clustering et al. , Neuro. Image 2005 30 EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component
The FM cluster accounts for all the memory effect EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering Onton et al. , 31 Neu
Are obtained component clusters “real“? • Naïve realism (a. k. a. “expertise”) • “Yes! … because I know one when I see one!” • “If it appears where Mu components appear, and acts like Mu components act, then it IS a Mu component!” • Convergent evidence (a. k. a. , “doublechecking”) • Two possible approaches: • Cluster on PLACE Check ACTIVITY consistency (re task) • Cluster on ACTIVITY Check PLACE consistency • Absolute truth: • More ideal forward and inverse models • Invasive multiscale recordings + modeling EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 32
Should all subjects be included in each cluster? Not all subjects contribute components to each cluster. Why not? • Different numbers of artifact components (~INR) • Subject differences!? • Is my subject group a Gaussian cloud? ? subject space EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 33
Known Uncertainty EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 34
The goal of cognitive neuroscience Cognitive Events Phys. Data Multiple Modes Anticipation Distributed Dynamics Re-evaluation Imagination Perturbations Modulations Value Model Individual Subjects Culture Personality Age / Gender Genetics EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 35
EEGLAB clustering procedure 1. Identify a set of datasets as an EEGLAB study or ‘studyset’. 2. Specify the subject group, subject code, condition and session of each dataset in the study. 3. Identify components to cluster in each study dataset. 4. Decide on component measures to use in clustering the study and/or to evaluate the obtained component clusters. 5. Compute the component measures for each study dataset. 6. Cluster the components on these component measures. 7. Review the obtained clusters (e. g. , their scalp maps, dipoles, and activity measures). 8. Edit the clusters (manually remove/shift components, make subclusters, merge clusters, re-cluster). 9. Perform signal processing within or between selected clusters. EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 36
Clustering strategy 1. Cluster on multiple measures (dipole locations, scalp maps, spectra, ERPs, ITCs, ERSPs) in one or more conditions. 2. Reduce the dimension of each measure to a principal component subspace. 3. Compose a PCA-reduced position vector for each component. 4. Cluster the composed component vectors using k-means or other. 5. Use the computed component measures (not PCA-reduced) to visualize the activities and spatial properties of the clustered components. 6. Compute and visualize the cluster-mean measures. 7. Use the clustered study set data as input into std_ functions. EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 37
Cluster ERP contributions - clust_envtopo() clust_envtopo(STUDY, ALLEEG, 'clusters', [], 'subclus', [3 7 18 20], 'env_erp', 'all', ‘vert', -1100, 'baseline', [-200 0], 'diff', [2 1], 'limits', [-1300 1500 -5 5], 'only_precomp', 'on', 'clustnums' , 4, 'limcontrib', [300 600]); EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 38
Component clustering research issues • Alternative clustering methods • Clustering goodness-of-fit • Cluster plotting details • Add new pre-clustering measures • Study subject differences!? • EEGLAB study design issues • Vector of conditions more general exp. designs • More complete study statistics EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 39
EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 40
Create a STUDY - pop_study() >> [ STUDY ALLEEG] = pop_study(ALLEEG); EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 41
Compute cluster measures - pop_preclust() >> [ALLEEG, STUDY] = pop_preclust(ALLEEG, STUDY); EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 42
Perform clustering - pop_clust() >> [STUDY] = pop_clust(ALLEEG, STUDY); EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 43
Plot cluster-mean scalp maps - pop_culstedit() >> [STUDY] = pop_clustedit(ALLEEG, STUDY, [2: 22]); EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 44
Plot the properties of a mu rhythm cluster EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 45
Rename a cluster EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 46
Merge clusters EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 47
Remove components ( outliers cluster #2) EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 48
Reassign components to clusters EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 49
Split a cluster - pop_preclust() >> [ALLEEG, STUDY] = pop_preclust(ALLEEG, STUDY, 14 ); EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 50
Sub-cluster - pop_clust() >> [STUDY] = pop_clust(ALLEEG, STUDY); EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 51
Inspect sub-clusters - pop_clustedit() >> [STUDY] = pop_clustedit(ALLEEG, STUDY, [23: 24]); EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 52
Hierarchical clustering – mu cluster separation EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 53
Using cluster info – std_ERPdiff() function [STUDY, grand_erpdiff, clusnval] = std_ERPdiff(STUDY, ALLEEG, clust, cond 1, cond 2) % computes the difference ERP of cond 1 - cond 2 if ~isfield(STUDY. cluster(clust). centroid, 'erp') STUDY = std_centroid(STUDY, ALLEEG, clust , 'erp'); end % compute cluster grand mean (= centroid) ERPs % Compute the grand mean difference ERP grand_erpdiff = STUDY. cluster(clust). centroid. erp{cond 1} - STUDY. cluster(clust). centroid. erp{cond 2}; try % collect the single-component ERPs for cond 1 clusnval 1 = std_clusread(STUDY, ALLEEG, clust, 'erp', cond 1); catch, disp([ 'ERPdiff: Some ERP information is missing, aborting. '] ); return; end try % collect the single-component ERPs for cond 2 clusnval 2 = std_clusread(STUDY, ALLEEG, clust, 'erp', cond 2); catch, disp([ 'ERPdiff: Some ERP information is missing, aborting. '] ); return; end % Compute the difference ERPs for the single components clusnval. erp = clusnval 1. erp - clusnval 2. erp; return. EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 54
Condition difference ERPs EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 55
Exercise – pop_clustedit() • Go to the STUDY directory >> cd [study] • Load STUDY of 5 sample datasets: >> load [sample. study] -mat – This study is already clustered • Call: >> [STUDY] = pop_clustedit(ALLEEG, STUDY); • Test clustedit options… EEGLAB Workshop IV, June 26 -29, 2007, Aspet, France: Scott Makeig – Component Clustering 56
- Slides: 56