tag:blogger.com,1999:blog-8887876422241311515.post7473055352334402902..comments2018-04-11T01:21:24.003-07:00Comments on Bishop_techbits: Automated removal of independent components to reduce trial-by-trial variation in event-related potentialsdeevybeehttp://www.blogger.com/profile/15118040887173718391noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-8887876422241311515.post-78912430691458583132011-09-11T09:14:28.575-07:002011-09-11T09:14:28.575-07:00Hi Max,
Thanks for your query, and apologies for ...Hi Max,<br /><br />Thanks for your query, and apologies for taking so long to get back.<br /><br />1a) when rejecting focal components, would it not be better to compute the zscore for each component separately, rather than concatenating all of them together? <br /><br />I don’t think so, because a z score is always based on the mean and standard deviation of the sample, so the z-score for each component would be scaled to the numbers in the distribution for just that component, and would be far less likely to identify extreme values - if you had around 32 electrodes, for instance, it’s unlikely you’d get a z-score greater than absolute values of 3. The current method identifies values that are extreme in the context of all the values of weights across all components. This is hard to explain in words, but as I mentioned before, it’s actually simplest to test ideas like this by just trying them out and seeing what happens. My guess is that you’d reject very few components using your approach.<br /><br />1b)<br />Also when you write<br />if mywt(1) < focalICAout<br />rej(k)=1;<br />end<br />shouldn't it be > focalICAout? <br /><br />Yes! I will correct this - thanks for spotting it. (This was correct in the full downloadable script, but I messed up in doing a simplified demonstration version for the blog).<br /><br />2) when rejecting components based on SNR, you compute zscore with the following command<br />zz=zscore(EEG.icaact);<br />which computes the zscore along the first non singleton dimension. The dimensions in EEG.icaact are [component, time, trial] (right?) so zz represents the zscore at each time point and trial relative to activity in all components at the same time point and trial. That does not seem like what we want. I use zscore(EEG.icaact,[],2) to zscore on the time dimension.<br /><br />I tried that with some of my data, but it seemed less effective. I think the issue is similar to the one with the focalICAout index. There are some components with very low activity. Your method would scale all components to the same scale I think, ignoring the absolute amount of activity. My method is sensitive to the amount of activity.<br />Certainly I found that my method did pick up those components that looked noisy on visual inspection. It’s worth running both methods and looking at the rej index to see which components are identified, and then looking at ComponentERPs in rectangular array from eeglab. You should be able to see those with noisy baselines, which are the ones this index should pick up. When I tried your method with a couple of my files, it tended to identify later components with little activity - the baseline and period of interest were similar in activity, hence the ratio was low, but not much activity was present in either.<br /><br />I’m open to persuasion otherwise - the methods are very much devised by trial and error to see which methods will identify the components that seem, by eye, to need removing. <br /><br />Thanks for your interest and good luck with your research.deevybeehttps://www.blogger.com/profile/15118040887173718391noreply@blogger.comtag:blogger.com,1999:blog-8887876422241311515.post-82594154372644777112011-09-09T06:51:41.694-07:002011-09-09T06:51:41.694-07:00Hi Max. Thanks for commenting. I'm afraid I ca...Hi Max. Thanks for commenting. I'm afraid I can't reply right now, as ultra busy but aim to look at your queries in the next few days.<br />Meanwhile, though, the best way to test alternatives to my program is to just try them out on a real dataset with artefacts in it.<br />You can readily see which components are deleted depending on how you alter the formula.deevybeehttps://www.blogger.com/profile/15118040887173718391noreply@blogger.comtag:blogger.com,1999:blog-8887876422241311515.post-20560153731723666192011-09-06T06:26:39.631-07:002011-09-06T06:26:39.631-07:00Dear Deevybee,
Thank you so much for this extremel...Dear Deevybee,<br />Thank you so much for this extremely interesting post. I am trying to make it work on my own data and have some questions:<br /><br />1) when rejecting focal components, would it not be better to compute the zscore for each component separately, rather than concatenating all of them together? When computing zscore on the concatenated icawinv, those components that have smooth topographies affect the zscore of all the other compontents, and that does not sound to me like something we want. Am I wrong?<br />Also when you write<br /> if mywt(1) < focalICAout<br /> rej(k)=1;<br /> end<br />shouldn't it be > focalICAout? What I understood from your method is that if the channel with highest zscore is above a certain threshold, we reject the component.<br /><br />2) when rejecting components based on SNR, you compute zscore with the following command<br />zz=zscore(EEG.icaact);<br />which computes the zscore along the first non singleton dimension. The dimensions in EEG.icaact are [component, time, trial] (right?) so zz represents the zscore at each time point and trial relative to activity in all components at the same time point and trial. That does not seem like what we want. I use zscore(EEG.icaact,[],2) to zscore on the time dimension.<br /><br />Once again, thank you very much for this post. Please let me know if I am mistaken above.<br />Best regards,<br />MaxMaxhttps://www.blogger.com/profile/18231813388759010991noreply@blogger.com