Dear Maarten,<div><br></div><div>>First of all, if I understand correctly, it is not the 2 different sphering matrices that I need to compare (filt vs. continuous) but it is the sphering*weights vs. the weights matrix of 1 dataset? And then check which ones are closest to each other?<br>

<br>Right. Just an example how it should work and what you should expect to see.</div><div><br></div><div>>My code is actually completely the same as yours.</div><div><br></div><div>No, watch carefully. It should be icaweights*icasphere, not the other way around. This order is kind of counterintuitive, isn't it? Try it again with the correct order and tell me what you  get.</div>

<div><br></div><div>Makoto<br><br><div class="gmail_quote">2013/2/26 Maarten De Schuymer <span dir="ltr"><<a href="mailto:maartendeschuymer@gmail.com" target="_blank">maartendeschuymer@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi again,<div><br></div><div>First of all, if I understand correctly, it is not the 2 different sphering matrices that I need to compare (filt vs. continuous) but it is the sphering*weights vs. the weights matrix of 1 dataset? And then check which ones are closest to each other?</div>


<div><br></div><div>My code is actually completely the same as yours.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<br>sphereMIR = getMIR(EEG.icasphere, EEG.data(:,:))<br>sphereMIR =<br>   27.4830<br>>> icaMIR = getMIR(EEG.icasphere*EEG.icaweights, EEG.data(:,:))<br>icaMIR =<br>  -19.3297 </blockquote><div><br></div><div>This is the result I get when using the sphering matrix of the filtered epoched data (so the real sphering matrix automatically computed by the ICA algorithm). </div>


<div><br></div><div>If I would have made a mistake in preprocessing, what should this be then? My preprocessing was quite straight forward: filter, epochation and then running ICA. I don't see how a mistake could have happened there :).</div>


<div><br></div><div>I did not however reran the ICA with amica, but just used the regular ICA weights and spheres that I had by using the runica, might this explain this difference?</div><div class="HOEnZb"><div class="h5">

<div><br></div><div><br><div class="gmail_quote">
2013/2/26 Makoto Miyakoshi <span dir="ltr"><<a href="mailto:mmiyakoshi@ucsd.edu" target="_blank">mmiyakoshi@ucsd.edu</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Dear Maarten,<div><br></div><div>Hmm strange.</div><div>Here are my results. You must be seeing something like this.</div><div><br></div><div>%%%%%%%%%%%%%%%</div><div><div>sphareMIR = getMIR(EEG.icasphere, EEG.data(:,:))</div>




<div>icaMIR    = getMIR(EEG.icaweights*EEG.icasphere, EEG.data(:,:))</div><div>dummyMIR  = getMIR(rand(68), EEG.data(:,:))</div><div><br></div><div>sphareMIR =</div><div><br></div><div>   88.0146</div><div><br></div><div>




<br></div><div>icaMIR =</div><div><br></div><div>   90.7252</div><div><br></div><div><br></div><div>dummyMIR =</div><div><br></div><div> -197.7197</div></div><div>%%%%%%%%%%%%%%%%</div><div><br></div><div>This tells you that the difference between sphering and ICA is very little and distinguished from random matrix (which gives you mutual info increase actually).</div>




<div><br></div><div>Why don't you give me the whole code you used. If I don't find anything wrong there you must have made a mistake in preprocessing.</div><div><br></div><div>Make sure you use same data (EITHER epoched or continuous) for comparison.</div>


<div><div>

<div><br></div><div>Makoto</div><div><br><div class="gmail_quote">2013/2/26 Maarten De Schuymer <span dir="ltr"><<a href="mailto:maartendeschuymer@gmail.com" target="_blank">maartendeschuymer@gmail.com</a>></span><br>




<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Makoto,<div><br></div><div>I do have some problems interpreting the output that is given by the getMIR.</div><div>




In what way should this output be interpreted?</div><div><br></div><div>In the following my results based on the epoched filtered data (so the sphering matrix obtained with the ICA dataset) and the newly computed sphering matrix (continuous). The inputs were in both case the same (EEG.data) and the W was either W_epoch = EEG.icaweights*sphere_epoch or W_cont = EEG.icaweights*sphere_continuous.</div>





<div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Obtained outputs:<br>mir_epoch: -19.3297<br>





v_epoch: 0.000046<br></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">mir_cont: -30.7652<br>





v_cont: 0.000045</blockquote><div><br></div><div>How come these values are negative? In what way should these be interpreted?</div><div><br></div><div>Thanks for the help; when everything is clear, I will send the results to the list.</div>




<div><div>
<div>Maarten</div><div> </div><br><div class="gmail_quote">2013/2/26 Makoto Miyakoshi <span dir="ltr"><<a href="mailto:mmiyakoshi@ucsd.edu" target="_blank">mmiyakoshi@ucsd.edu</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





Dear Maarten,<div><br></div><div>Yes. If you find any problem let me know.</div><span><font color="#888888"><div><br></div></font></span><div><span><font color="#888888">Makoto</font></span><div>
<div><br><br><div class="gmail_quote">2013/2/26 Maarten De Schuymer <span dir="ltr"><<a href="mailto:maartendeschuymer@gmail.com" target="_blank">maartendeschuymer@gmail.com</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Makoto,<div><br></div><div>thank you for the file. I will check how long it takes and in the worst case scenario I can also run it via a central server.</div>







<div>So after running amica I can use the function getMIR() to check which W works better, right?</div>
<div><br></div><div>Thanks for all the help.</div><span><font color="#888888"><div><br></div></font></span><div><span><font color="#888888">Maarten</font></span><div><div><br><br>

<div class="gmail_quote">2013/2/26 Makoto Miyakoshi <span dir="ltr"><<a href="mailto:mmiyakoshi@ucsd.edu" target="_blank">mmiyakoshi@ucsd.edu</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Maarten,<div><br></div><div>Here is the file. Good luck.</div><div>I CCed to Jason so that he can check the repository.</div>








<div><br></div><div>I'm not sure if it's a good idea to use AMICA in 4-8 core CPUs. We usually use 32-64 (which is a dedicated server for parallel computation). You can try it anyway to see how long it takes. The default iteration is 2000 which may be too many in that case. Some of us uses 750 for your information.</div>








<span><font color="#888888">

<div><br></div><div>Makoto</div></font></span><div><div><div><br></div><div><br><br><div class="gmail_quote">2013/2/25 Maarten De Schuymer <span dir="ltr"><<a href="mailto:maartendeschuymer@gmail.com" target="_blank">maartendeschuymer@gmail.com</a>></span><br>










<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Makoto,<div><br></div><div>I am having some troubles installing the amica toolbox. I followed the steps on the site, but after running the command in terminal  (I have a mac, 64 bit), it didn't find the runamica12.m file anywhere. Subsequentely, I searched for this file and found it on Jason Palmer's site. However, I'm still not able to execute runamica because I don't find AMDIR in that file (I suppose it has been renamed for another version), which -according to the wiki- needs me to specify the path . Moreover, I don't find any info on the getMIR() function online.</div>











<div>Any help on this would be highly appreciated.</div><div><br></div><div>Best,</div><div>Maarten<div><div><br><br><div class="gmail_quote">2013/2/22 Makoto Miyakoshi <span dir="ltr"><<a href="mailto:mmiyakoshi@ucsd.edu" target="_blank">mmiyakoshi@ucsd.edu</a>></span><br>











<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Maarten,<div><br></div><div>I asked it to Nima offline at SCCN B177E. He said categorically no because ICA weight matrix is very dependent of the sphering matrix.</div>











<div><br></div><div>By the way you can download a function getMIR() which is included in the amica toolbox downloadable from the following URL link: <a href="http://sccn.ucsd.edu/wiki/Amica_Download" target="_blank">http://sccn.ucsd.edu/wiki/Amica_Download</a> </div>













<div>This function would eventually tells you which W works better in terms of mutual information reduction (this unmixing matrix W should be a product of sphering matrix x ica weight matrix). Let us know if you find something interesting.</div>











<span><font color="#888888">

<div><br></div></font></span><div><span><font color="#888888"><div>Makoto</div><div><br></div></font></span><div><div class="gmail_quote"><div><div>2013/2/22 Maarten De Schuymer <span dir="ltr"><<a href="mailto:maartendeschuymer@gmail.com" target="_blank">maartendeschuymer@gmail.com</a>></span><br>













</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Dear list,<br><br>I am still trying to figure out which is the correct sphering matrix when applying ICA weights to another version of the same dataset.<br>













Is there an expert who can weight in on this issue?<br><br>Thanks a lot,<br>
Maarten De Schuymer<div><div><br><br>---------- Forwarded message ----------<br>From: Maarten De Schuymer <<a href="mailto:maartendeschuymer@gmail.com" target="_blank">maartendeschuymer@gmail.com</a>><br>

Date: 2013/2/14<br>Subject: Applying ICA weight matrix on another dataset<br>
To: <a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a><br><br><br>Dear list,<br><br><br>I have a question concerning the role of the sphering matrix (which decorrelates the channels) in the rather common scenario where I compute an ICA on one version of a dataset, but then apply the ICA results to another version of the same data (e.g. epoched vs. continuous, filtered vs. unfiltered).<br>














<br>To remove artifacts in my study, I compute the ICA on high-pass filtered (e.g. 1 Hz) data, because this results in much better ICA decompositions. However, I would like to apply the results of this ICA to my original, unfiltered version of the same dataset, because would like to keep slow potentials (< 1 Hz) in the data. After running ICA on the filtered data, I save both EEG.icaweights and EEG.icasphere. <br>














<br><br>When I now apply the ICA weight matrix to the original data it is unclear to me which sphering matrix needs to be used.<br><br>Should I (A) also import the ICA sphering matrix from the filtered data or (B) recompute the sphering matrix (cmd: sphere(EEG.data)) for the original unfiltered data and consequently use that one. Both possibilities result in different outcomes since sphering matrices are different for both versions of the datasets. Which of these possibilities are recommended and more importantly, why exactly?<br>














<br>A related question concerns the exporting-importing of the weight matrix in the GUI of EEGLAB. When exporting weights, a single exported file contains the combined weight*sphering matrix. However, when importing, two different files need to be imported, i.e. both weight matrix and sphere matrix separately. This does not seem practical. Or is there a rationale behind this distinction between import and export?<br>














<br><br>Thanks for any input on this,<br><br><br>Best<br>Maarten De Schuymer<br><br> <br><br>
</div></div><br></div></div><div>_______________________________________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a><br></div></blockquote></div><div>
<br><br clear="all"><div><br></div>

-- <br>Makoto Miyakoshi<br>JSPS Postdoctral Fellow for Research Abroad<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br>
</div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Makoto Miyakoshi<br>JSPS Postdoctral Fellow for Research Abroad<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br>











</div>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Makoto Miyakoshi<br>JSPS Postdoctral Fellow for Research Abroad<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br>








</div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Makoto Miyakoshi<br>JSPS Postdoctral Fellow for Research Abroad<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br>





</div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Makoto Miyakoshi<br>JSPS Postdoctral Fellow for Research Abroad<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br>


</div>