Yes, it computes Pearson correlation between all voxel pairs between every pair of subjects.<br>As you said, it becomes tractable with ROI. If you are using a ROI, ANOVA-based feature selection might work as well since all<br>

selected voxels from different subjects come from approximately the same brain region (restricted by that ROI).<br clear="all"><br>Swaroop<font style="color:rgb(102,102,102)" color="#888888" size="2"><br></font><font style="color:rgb(102,102,102)" size="2"><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"></span></span></span></font><br>


<br><br><div class="gmail_quote">On Mon, May 21, 2012 at 3:19 PM, Kiefer Katovich <span dir="ltr"><<a href="mailto:kieferk@stanford.edu" target="_blank">kieferk@stanford.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

As I understand, the method that you used in the Neuron paper when the subjects watched the movie involves multiplying one subject's data matrix by the transpose of another subject's?<br><br>For example, in test_hyperalignment.py in pymvpa this is the code that I believe is doing that:<br>



<br>for i, sd in enumerate(ds):<br>            ds_temp = sd.copy()<br>            zscore(ds_temp, chunks_attr=None)<br>            for j, sd2 in enumerate(ds[i+1:]):<br>                ds_temp2 = sd2.copy()<br>                zscore(ds_temp2, chunks_attr=None)<br>



                corr_temp = np.dot(ds_temp.samples.T, ds_temp2.samples)<br>                feature_scores[i] = feature_scores[i] + \<br>                                    np.max(corr_temp, axis = 1)<br>                feature_scores[j+i+1] = feature_scores[j+i+1] + \<br>



                                        np.max(corr_temp, axis = 0)<div><br></div><div><br></div><div>I actually had tried to use this type of feature selection originally, but the matrix multiplication ended up being so computationally expensive that I switched to the feature selection method in the hyperalignment tutorial on the website.</div>



<div><br></div><div>I suppose if I use that feature selection with a predetermined ROI (that is small enough) then the computational requirements should become reasonable.</div><div class="HOEnZb"><div class="h5"><div><br>

</div><div><br></div><div><br><br>
On Sat, May 19, 2012 at 12:41 PM, Swaroop Guntupalli <<a href="mailto:swaroopgj@gmail.com" target="_blank">swaroopgj@gmail.com</a>> wrote:<br>
><br>> It's not so much about using ROIs from prior assumptions than to make sure that you are selecting voxels from approximately the same regions in the brain from all your subjects. Your current approach doesn't necessarily guarantee that. This is independent of SVD non-convergence error.<br>



> I am not sure if it would be appropriate/better, but you can try the method we used on our Neuron paper which needs no trial information except that the TRs should all be aligned across subjects (make sure you do this if you randomized trials or runs for each subject).<br>



><br>> Swaroop<br>><br>><br>><br>><br>> On Sat, May 19, 2012 at 3:21 PM, Kiefer Katovich <<a href="mailto:kieferk@stanford.edu" target="_blank">kieferk@stanford.edu</a>> wrote:<br>>><br>>> I could definitely use an ROI for the feature selection, but preferably I would be able to do a feature selection using the whole brain without any a priori assumptions about which areas will contain the best voxels. Is there a more appropriate feature selector than the one way anova that could potentially give me a better set of voxels from the whole brain to use in hyperalignment?<br>



>><br>>><br>>> On Sat, May 19, 2012 at 12:04 PM, Swaroop Guntupalli <<a href="mailto:swaroopgj@gmail.com" target="_blank">swaroopgj@gmail.com</a>> wrote:<br>>>><br>>>> Looks like it could be a problem with the voxels selected. It is possible that the voxel selection one way vs the other is leading to degenerate matrices for SVD to work on. If you have an independent ROI (function/anatomical), try hyperalignment on voxels within that ROI.<br>



>>><br>>>> Swaroop<br>>>><br>>>><br>>>><br>>>><br>>>> On Fri, May 18, 2012 at 7:27 PM, Kiefer Katovich <<a href="mailto:kieferk@stanford.edu" target="_blank">kieferk@stanford.edu</a>> wrote:<br>



>>>><br>>>>> Hi again,<br>>>>><br>>>>> I will try those two ways of outputting the feature selection, they both seem straightforward. <br>>>>><br>>>>> I spoke to soon on the SVD non-convergence issue. As it turns out it really seems to depend on how I set the targets for the datasets. SVD seems to converge better when there are more "classes" set with the targets. For example, if i set there to be 8 different categories in my data SVD can converge on the entire dataset, but if I set it to be binary it has a lot of trouble converging.<br>



>>>><br>>>>> For example, I set the first two TRs of every trial to 1 and all other TRs to 0 in the targets file. If I use this for feature selection and then hyperalignment, it does not converge with most combinations of subjects.<br>



>>>><br>>>>> However, if I designate trialtype and specific TRs within the targets file it is able to converge with all the subjects.<br>>>>><br>>>>> I'm not to clear on why this would be the case. I assume that the anova feature selection is picking out the voxels that best match the time series of the targets that you assign to each TR? I know that in a univariate solution with the binary targets there are definitely voxels that correlate significantly with the 1s (first two TRs of every trial), so I figured that the feature selector would probably pull out those.<br>



>>>><br>>>>> I hope that wasn't too confusing. I'm just wondering if there is some criterion that I am missing when assigning the target file that is necessary for hyperalignment to run correctly.<br>



>>>><br>>>>> Thank you,<br>>>>> Kiefer<br>>>>><br>>>>><br>>>>><br>>>>> On Fri, May 18, 2012 at 12:29 PM, Swaroop Guntupalli <<a href="mailto:swaroopgj@gmail.com" target="_blank">swaroopgj@gmail.com</a>> wrote:<br>



>>>>><br>>>>>> Hi Kiefer,<br>>>>>><br>>>>>> Glad that it's working.<br>>>>>> Whatever mapper you are using (StaticFeatureSelection?) should have a slicearg argument that contains the list of voxel indices.<br>



>>>>> Another way is to create an array of ones of the same size as the number of features selected and pass it bakward through the mappers through which the Data came through before hyperalignment (mapper_name.reverse(new_data)), which should put the data in the original space. You can then use map2nifti to map those selected voxels (as ones) into a nifti file.<br>



>>>>> Does that make sense?<br>>>>>><br>>>>>> Best,<br>>>>>> Swaroop<br>>>>>><br>>>>>><br>>>>>><br>>>>>><br>



>>>>> On Fri, May 18, 2012 at 3:02 PM, Kiefer Katovich <<a href="mailto:kieferk@stanford.edu" target="_blank">kieferk@stanford.edu</a>> wrote:<br>>>>>>><br>>>>>>> Hey Swaroop,<br>


>>>>>><br>
>>>>>> I actually managed to fix the SVD non-convergence issue. Turns out that I had foolishly not been lagging my data for the hemodynamic response. Once I lagged the targets appropriately, i was able to hyperalign all of the brains without encountering any SVD problems.<br>



>>>>>><br>>>>>>> I would like to visualize the features that are being selected that hyperalignment is using for the transformation. What should I do after preforming the OneWayAnova and the StaticFeatureSelector to save those selected features into a nifti that I can overlay on the subjects' brains? It would be really nice to know which areas of the brain end up being selected for alignment (I am allowing it to choose the top 5% voxels of any voxels in the brain).<br>



>>>>>><br>>>>>>> Thanks for your help!<br>>>>>>> Kiefer<br>>>>>>><br>>>>>>><br>>>>>>><br>>>>>>> On Fri, May 18, 2012 at 6:33 AM, Swaroop Guntupalli <<a href="mailto:swaroopgj@gmail.com" target="_blank">swaroopgj@gmail.com</a>> wrote:<br>



>>>>>>><br>>>>>>>> Hi Kiefer,<br>>>>>>>><br>>>>>>>> Sorry for late response (I blame abstract submission deadlines).<br>>>>>>>><br>



>>>>>>> I sometimes (very few though) encounter this SVD non convergence problem.<br>>>>>>>> One workaround I use (and that works for me) is to try a different SVD implementation: dgesvd instead of numpy (option in ProcrusteanMapper)<br>



>>>>>>> If it doesn't work any SVD implementation, it means the matrix is probably bad for some reason, which might mean one or more of the data<br>>>>>>>> matrices is messed up (SVD is on the product of 2 data matrices), so make sure you exclude all invariant voxels from the data (you can do that using "remove_invariant_features".<br>



>>>>>>> HTH.<br>>>>>>>> Keep us posted on your progress.<br>>>>>>>><br>>>>>>>> Thanks,<br>>>>>>>> Swaroop<br>>>>>>>><br>



>>>>>>><br>>>>>>>><br>>>>>>>> On Tue, May 1, 2012 at 2:38 PM, Kiefer Katovich <<a href="mailto:kieferk@stanford.edu" target="_blank">kieferk@stanford.edu</a>> wrote:<br>



>>>>>>>><br>>>>>>>>> Hi again,<br>>>>>>>>><br>>>>>>>>> Sorry my messages keep starting new threads; I've been receiving email<br>



>>>>>>>> in digest mode but changed my settings to single mail, so I should be<br>>>>>>>>> able to reply properly soon.<br>>>>>>>>><br>>>>>>>>> First off – I re-ran the iterative test of hyperalignment starting<br>



>>>>>>>> with a different set of subjects. This time 8 of the 21 subjects<br>>>>>>>>> managed to be hyperaligned to each other, and most of the successful<br>>>>>>>>> subjects were different than in the last batch. I just did this to<br>



>>>>>>>> confirm that the success of hyperalignment is contingent upon the<br>>>>>>>>> unique set of datasets that you put into it, and not just that some<br>>>>>>>>> subjects were bad and others good.<br>



>>>>>>>><br>>>>>>>>> Now, on to your comments:<br>>>>>>>>><br>>>>>>>>> Thanks for the clarification on hyperalignment and SVD. I should<br>



>>>>>>>> probably read the source code to get a better idea of exactly what<br>>>>>>>>> hyperalignment and the procrustean transformation is attempting to do<br>>>>>>>>> with the datasets I give it.<br>



>>>>>>>><br>>>>>>>>> By "classification error" I only meant the way in which I had coded<br>>>>>>>>> the time points of the dataset into separate classes, not actually<br>



>>>>>>>> running a classification algorithm. Sorry for the misconception, that<br>>>>>>>>> was poor phrasing on my part.<br>>>>>>>>><br>>>>>>>>> A related question: how much of an impact does the coding of time<br>



>>>>>>>> points have on hyperalignment? I assume that the feature selector,<br>>>>>>>>> such as OneWayAnova, chooses features according to the "targets" that<br>>>>>>>>> you assign to each time point, and that this is then fed into<br>



>>>>>>>> hyperalignment and procrustean?<br>>>>>>>>><br>>>>>>>>> Here are some details on my data:<br>>>>>>>>><br>>>>>>>>> 432 time points<br>



>>>>>>>> ~58000 voxels per time point (whole brain, masked)<br>>>>>>>>> 3000 features selected using FixedNElementTailSelector<br>>>>>>>>><br>>>>>>>>> I assumed that it is only the 3000 features from the tail selector<br>



>>>>>>>> that hyperalignment and procrustean use to make the alignment?<br>>>>>>>>><br>>>>>>>>> Ideally I would not have to mask out to a specific area of the brain<br>



>>>>>>>> prior to the feature selection. I prefer, for this data, to not make<br>>>>>>>>> an initial assumption about which brain areas contain the best<br>>>>>>>>> features for alignment.<br>



>>>>>>>><br>>>>>>>>> Thanks you,<br>>>>>>>>><br>>>>>>>>> Kiefer<br>>>>>>>>><br>>>>>>>>> _______________________________________________<br>



>>>>>>>> Pkg-ExpPsy-PyMVPA mailing list<br>>>>>>>>> <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>

>>>>>>>> <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a><br>

>>>>>>><br>>>>>>>><br>>>>>>>><br>>>>>>>> _______________________________________________<br>>>>>>>> Pkg-ExpPsy-PyMVPA mailing list<br>



>>>>>>> <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>>>>>>>> <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a><br>



>>>>>><br>>>>>>><br>>>>>>><br>>>>>>> _______________________________________________<br>>>>>>> Pkg-ExpPsy-PyMVPA mailing list<br>>>>>>> <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>



>>>>>> <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a><br>>>>>><br>

>>>>><br>

>>>>><br>>>>>> _______________________________________________<br>>>>>> Pkg-ExpPsy-PyMVPA mailing list<br>>>>>> <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>



>>>>> <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a><br>>>>><br>

>>>><br>

>>>><br>>>>> _______________________________________________<br>>>>> Pkg-ExpPsy-PyMVPA mailing list<br>>>>> <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>



>>>> <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a><br>>>><br>>>><br>

>>><br>

>>> _______________________________________________<br>>>> Pkg-ExpPsy-PyMVPA mailing list<br>>>> <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>



>>> <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a><br>>><br>>><br>>><br>

>> _______________________________________________<br>

>> Pkg-ExpPsy-PyMVPA mailing list<br>>> <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>>> <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a><br>



><br>><br>><br>> _______________________________________________<br>> Pkg-ExpPsy-PyMVPA mailing list<br>> <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>



> <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a><br><br></div>
</div></div><br>_______________________________________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a><br></blockquote></div><br>