<div dir="ltr">Yes. We require the searchlight centers to match across subjects.<div>If you use common mask, that should fix it.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 4, 2016 at 8:30 AM, David Soto <span dir="ltr"><<a href="mailto:d.soto.b@gmail.com" target="_blank">d.soto.b@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">​Hi Swaroop, I then get this message, which might be becos of the different number of features across subjects, which would lead to different ids across subjects?</div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><span style="font-size:14px;white-space:pre-wrap;font-family:arial,sans-serif;color:rgb(139,0,0)">RuntimeError</span><span style="color:rgb(0,100,0);font-size:14px;white-space:pre-wrap;background-color:transparent;font-family:arial,sans-serif">: Query engine IndexQueryEngine(voxel_<wbr>indices=Sphere(radius=3)) provided different ids than IndexQueryEngine(voxel_<wbr>indices=Sphere(radius=3)). Not supported</span>​</div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">I think I should try with the intersection mask</div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">thanks</div><span class="HOEnZb"><font color="#888888"><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">david</div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 4 August 2016 at 17:09, Swaroop Guntupalli <span dir="ltr"><<a href="mailto:swaroopgj@gmail.com" target="_blank">swaroopgj@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi David,<br></div><div>You need to change this line</div><div><span style="color:rgb(80,0,80);font-family:garamond,serif;font-size:large">qe.append(testqe.query_byid)</span></div><div><span style="color:rgb(80,0,80);font-family:garamond,serif;font-size:large">to this</span></div><div><span style="color:rgb(80,0,80);font-family:garamond,serif;font-size:large">qe.append(testqe)</span><span style="color:rgb(80,0,80);font-family:garamond,serif;font-size:large"><br></span></div><div><br></div><div>Intersection mask might work. I usually do it by computing a binary mask in each subject with non-invariant features (use std(axis=0)==0) and then do an "and" of these masks.</div><div><br></div><div>Does that help?</div><div>Best,</div><div>Swaroop</div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 4, 2016 at 3:50 AM, David Soto <span dir="ltr"><<a href="mailto:d.soto.b@gmail.com" target="_blank">d.soto.b@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">Thanks very much Swaroop,  the code still gives an error, please see below -also final comment at the bottom of the email</div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><pre style="overflow:auto;font-size:14px;padding:0px;margin-top:0px;margin-bottom:0px;line-height:inherit;word-wrap:break-word;background-color:transparent;border:0px;border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-bottom-left-radius:0px;white-space:pre-wrap;vertical-align:baseline"><span style="color:rgb(139,0,0)">------------------------------<wbr>------------------------------<wbr>---------------</span>
<span style="color:rgb(139,0,0)">AttributeError</span>                            Traceback (most recent call last)
<span style="color:rgb(0,100,0)"><ipython-input-52-8bb0dc44f9a7<wbr>></span> in <span style="color:rgb(70,130,180)"><module><span style="color:rgb(0,0,139)">()</span>
<span style="color:rgb(0,100,0)">     63</span>     <span style="color:rgb(139,0,0)"># Searchlight Hyperalignment returns a list of mappers corresponding to</span><span style="color:rgb(0,0,139)"></span><span style="color:rgb(0,0,139)"></span>
<span style="color:rgb(0,100,0)">     64</span>     <span style="color:rgb(139,0,0)"># subjects in the same order as the list of datasets we passed in.</span><span style="color:rgb(0,0,139)"></span><span style="color:rgb(0,0,139)"></span>
<span style="color:rgb(0,100,0)">---> 65<span style="color:rgb(139,0,0)">     </span>slhypmaps <span style="color:rgb(0,0,139)">=</span> slhyper<span style="color:rgb(0,0,139)">(</span>ds_train<span style="color:rgb(0,0,139)">)</span><span style="color:rgb(0,0,139)"></span>
<span>     66</span> <span style="color:rgb(0,0,139)"></span>
<span>     67</span>     <span style="color:rgb(139,0,0)"># Applying hyperalignment parameters is similar to applying any mapper in</span><span style="color:rgb(0,0,139)"></span><span style="color:rgb(0,0,139)"></span>

<span>/usr/local/lib/python2.7/site-<wbr>packages/mvpa2/algorithms/sear<wbr>chlight_hyperalignment.pyc</span> in <span style="color:rgb(70,130,180)">__call__<span style="color:rgb(0,0,139)">(self, datasets)</span>
<span style="color:rgb(0,100,0)">    554</span>         <span style="color:rgb(139,0,0)"># alignment, i.e. the SL ROIs cover roughly the same area</span><span style="color:rgb(0,0,139)"></span><span style="color:rgb(0,0,139)"></span>
<span style="color:rgb(0,100,0)">    555</span>         queryengines = self._get_trained_queryengines<wbr>(
<span style="color:rgb(0,100,0)">--> 556<span style="color:rgb(139,0,0)">             datasets, params.queryengine, params.radius, params.ref_ds)
</span><span>    557</span>         <span style="color:rgb(139,0,0)"># For surface nodes to voxels queryengines, roi_seed hardly makes sense</span><span style="color:rgb(0,0,139)"></span><span style="color:rgb(0,0,139)"></span>
<span>    558</span>         <span>if</span> isinstance<span style="color:rgb(0,0,139)">(</span>queryengines<span style="color:rgb(0,0,139)">[</span>params<span style="color:rgb(0,0,139)"><wbr>.</span>ref_ds<span style="color:rgb(0,0,139)">]</span><span style="color:rgb(0,0,139)">,</span> SurfaceVerticesQueryEngine<span style="color:rgb(0,0,139)">)</span><span style="color:rgb(0,0,139)">:</span><span style="color:rgb(0,0,139)"></span>

<span>/usr/local/lib/python2.7/site-<wbr>packages/mvpa2/algorithms/sear<wbr>chlight_hyperalignment.pyc</span> in <span style="color:rgb(70,130,180)">_get_trained_queryengines<span style="color:rgb(0,0,139)">(self<wbr>, datasets, queryengine, radius, ref_ds)</span>
<span style="color:rgb(0,100,0)">    666</span>                 _shpaldebug<span style="color:rgb(0,0,139)">(</span><span style="color:rgb(0,0,139)">"Training provided query engines"</span><span style="color:rgb(0,0,139)">)</span><span style="color:rgb(0,0,139)"></span>
<span style="color:rgb(0,100,0)">    667</span>                 <span style="color:rgb(0,100,0)">for</span> qe<span style="color:rgb(0,0,139)">,</span> ds <span style="color:rgb(0,100,0)">in</span> zip<span style="color:rgb(0,0,139)">(</span>queryengines<span style="color:rgb(0,0,139)">,</span> datasets<span style="color:rgb(0,0,139)">)</span><span style="color:rgb(0,0,139)">:</span><span style="color:rgb(0,0,139)"></span>
<span style="color:rgb(0,100,0)">--> 668<span style="color:rgb(139,0,0)">                     </span>qe<span style="color:rgb(0,0,139)">.</span>train<span style="color:rgb(0,0,139)">(</span>ds<span style="color:rgb(0,0,139)">)</span><span style="color:rgb(0,0,139)"></span>
<span>    669</span>             <span>else</span><span style="color:rgb(0,0,139)">:</span><span style="color:rgb(0,0,139)"></span>
<span>    670</span>                 queryengine<span style="color:rgb(0,0,139)">.</span>train<span style="color:rgb(0,0,139)">(</span>datasets<span style="color:rgb(0,0,139)">[</span>ref<wbr>_ds<span style="color:rgb(0,0,139)">]</span><span style="color:rgb(0,0,139)">)</span><span style="color:rgb(0,0,139)"></span>

<span style="color:rgb(139,0,0)">AttributeError</span>: 'function' object has no attribute 'train'
</span></span></span></span></span></span></pre><div><span style="color:rgb(70,130,180)"><span style="color:rgb(0,100,0)"><span style="color:rgb(70,130,180)"><span style="color:rgb(0,100,0)"><span style="color:rgb(70,130,180)"><span style="color:rgb(0,100,0)"><br></span></span></span></span></span></span></div><div><span style="color:rgb(70,130,180)"><span style="color:rgb(0,100,0)"><span style="color:rgb(70,130,180)"><span style="color:rgb(0,100,0)"><span style="color:rgb(70,130,180)"><span style="color:rgb(0,100,0)">_____</span></span></span></span></span></span></div><div><span style="color:rgb(70,130,180)"><span style="color:rgb(0,100,0)"><span style="color:rgb(70,130,180)"><span style="color:rgb(0,100,0)"><span style="color:rgb(70,130,180)"><span style="color:rgb(0,100,0)"><div>%reset</div><div>from mvpa2.suite import * </div><div>path0='/Users/dsoto/Dropbox/4h<wbr>yperal'</div><div>attr = SampleAttributes(os.path.join(<wbr>path0, 'attrs_cv_singlsubj2chunk.txt'<wbr>))</div><span><div>d=[] </div><div>qe=[]</div><div>num=-1 </div><div>for subj in range(1,5):</div><div>    num=num+1</div><div>    print(subj)</div><div>    datapath='/Users/dsoto/Dropbox<wbr>/4hyperal/subj%d' %(int(subj))</div><div>    d.append(fmri_dataset(samples=<wbr>os.path.join(datapath, 'reg4mm.nii.gz'), </div><div>                      targets=attr.targets, chunks=attr.chunks,</div><div>                      mask=os.path.join(path0, 'mni4mm.nii.gz')))</div><div>   </div><div>    d[num]=remove_invariant_featur<wbr>es(d[num])</div></span><div>    testqe=IndexQueryEngine(voxel_<wbr>indices=Sphere(3))</div><div>    testqe.train(d[num])</div><span><div>    qe.append(testqe.query_byid)</div><div>    </div><div>qe_merged = [qe[0],qe[1],qe[2],qe[3]]</div><div>ds_merged = [d[0],d[1],d[2],d[3]]</div><div><br></div></span><div> _ = [zscore(ds) for ds in ds_merged]<br></div><div><br></div><div> for i, sd in enumerate(ds_merged):<br></div><div>    <a href="http://sd.sa" target="_blank">sd.sa</a>['subject'] = np.repeat(i, len(sd))</div><div> </div><div>nsubjs = 4<br></div><div> ncats = 2</div><div>nruns = 2<br></div><div><br></div><div> </div><div>bsc_slhyper_results = []</div><div>clf = LinearCSVMC()</div><span><div><br></div><div>cv = CrossValidation(clf, NFoldPartitioner(attr='subject<wbr>'),<br></div><div>                     errorfx=mean_match_accuracy)</div><div><br></div><div>for test_run in range(nruns):<br></div></span><div>    ds_train = [sd[sd.sa.chunks != test_run, :] for sd in ds_merged]<br></div><div>    ds_test = [sd[sd.sa.chunks == test_run, :] for sd in ds_merged]</div><div>    <br></div><div>    slhyper = SearchlightHyperalignment(quer<wbr>yengine=qe_merged)</div><span><div>    slhypmaps = slhyper(ds_train)<br></div><div><br></div><div>    ds_hyper = [h.forward(sd) for h, sd in zip(slhypmaps, ds_test)]<br></div><div><br></div><div>    ds_hyper = vstack(ds_hyper)<br></div><div>    zscore(ds_hyper, chunks_attr='subject')</div><div>    res_cv = cv(ds_hyper)</div><div>    bsc_slhyper_results.append(res<wbr>_cv)</div><div><br></div></span><div>bsc_slhyper_results = hstack(bsc_slhyper_results)</div><div> </div></span></span></span></span></span></span></div><div>However, as you know it is likely that searchlighhyperaligment wont work well if each dataset has different number of features....so perhaps would be worth to compare any result with  the second analyses option you suggested, that is once I  remove invariant features from each subjects dataset, I could derive an intersection mask with valid features across all subjects and then use this mask when I load the data with fmri_dataset......however could you let me know how can this  intersection mask be derived?</div><div><br></div><div>best</div><div>david</div></div><div class="gmail_extra"><br clear="all"><div><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><img alt="" style="color:rgb(0,0,0);font-family:garamond,serif;font-size:large;margin:0px 0.2ex;vertical-align:middle;min-height:24px;width:24px"><img alt="" style="color:rgb(0,0,0);font-family:garamond,serif;font-size:large;margin:0px 0.2ex;vertical-align:middle;min-height:24px;width:24px"><img alt="" style="color:rgb(0,0,0);font-family:garamond,serif;font-size:large;margin:0px 0.2ex;vertical-align:middle;min-height:24px;width:24px"></div><div dir="ltr">___________</div></div></div></div></div></div></div></div></div></div><div><div>
<br><div class="gmail_quote">On 3 August 2016 at 18:33, Swaroop Guntupalli <span dir="ltr"><<a href="mailto:swaroopgj@gmail.com" target="_blank">swaroopgj@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi David,<div><br></div><div>You have to train the queryengine, here is a little modified version of what you pasted.</div><div>However, remember that the datasets should be approximately similar in coverage. I noticed that your first subject has ~80,000 non-invariant features and some other subjects have ~30,000. That's a huge margin.</div><div><br></div><div>I am not sure how hyperalignment performs with so many missing regions.</div><div>Swaroop</div><div><br></div><div><span><div style="color:rgb(0,0,0);font-size:12.8px"><font color="#000000" face="garamond, serif" size="4"> d[num]=remove_invariant_featu<wbr>res(d[num])</font></div><div style="color:rgb(0,0,0);font-size:12.8px"><font color="#000000" face="garamond, serif" size="4">    </font></div></span><div style="color:rgb(0,0,0);font-size:12.8px"><font color="#000000" face="garamond, serif" size="4">     # You don't need this line below</font></div><div style="color:rgb(0,0,0);font-size:12.8px"><font color="#000000" face="garamond, serif" size="4">    #</font><font face="garamond, serif" size="4" color="#0000ff">voxel_indices=d[num].fa.vox<wbr>el_indices</font></div><div style="color:rgb(0,0,0);font-size:12.8px"><font face="garamond, serif" size="4" color="#0000ff">    </font></div><div style="color:rgb(0,0,0);font-size:12.8px"><font face="garamond, serif" size="4" color="#0000ff">    testqe=IndexQueryEngine(voxel_<wbr>indices=Sphere(3))</font></div><div style="color:rgb(0,0,0);font-size:12.8px"><font face="garamond, serif" size="4" color="#0000ff">    # Train the testqe with that dataset</font></div><div style="color:rgb(0,0,0);font-size:12.8px"><font face="garamond, serif" size="4" color="#0000ff">    testqe.train(d[num])</font></div><div style="color:rgb(0,0,0);font-size:12.8px"><font face="garamond, serif" size="4" color="#0000ff"><br></font></div><div style="color:rgb(0,0,0);font-size:12.8px"><font face="garamond, serif" size="4" color="#0000ff">    qe.append(testqe.query_byid)</font></div></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 2, 2016 at 6:30 AM, David Soto <span dir="ltr"><<a href="mailto:d.soto.b@gmail.com" target="_blank">d.soto.b@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">Hi Swaroop, thanks for looking into it...</div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><br></div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">There does not seem be a clear documentation on how to get the query engines ..from what I have seen this is what I did:</div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><br></div><div><div><font color="#000000" face="garamond, serif" size="4">d=[] </font></div><div><font color="#000000" face="garamond, serif" size="4">qe=[]</font></div><div><font color="#000000" face="garamond, serif" size="4">num=-1  </font></div><div><font color="#000000" face="garamond, serif" size="4">for subj in range(1,5):</font></div><div><font color="#000000" face="garamond, serif" size="4">    num=num+1</font></div><div><font color="#000000" face="garamond, serif" size="4">    print(subj)</font></div><div><font color="#000000" face="garamond, serif" size="4">    datapath='/Users/dsoto/Dropbox<wbr>/4hyperal/subj%d' %(int(subj))</font></div><div><font color="#000000" face="garamond, serif" size="4">    d.append(fmri_dataset(samples=<wbr>os.path.join(datapath,              'reg4mm.nii.gz'), </font></div><div><font color="#000000" face="garamond, serif" size="4">                      targets=attr.targets, chunks=attr.chunks,</font></div><div><font color="#000000" face="garamond, serif" size="4">                      mask=os.path.join(path0, 'mni4mm.nii.gz')))</font></div><div><font color="#000000" face="garamond, serif" size="4">   </font></div><div><font color="#000000" face="garamond, serif" size="4">    d[num]=remove_invariant_featur<wbr>es(d[num])</font></div><div><font color="#000000" face="garamond, serif" size="4">    </font></div><div><font color="#000000" face="garamond, serif" size="4">    </font><font face="garamond, serif" size="4" color="#0000ff">voxel_indices=d[num].fa.voxel_<wbr>indices</font></div><div><font face="garamond, serif" size="4" color="#0000ff">    </font></div><div><font face="garamond, serif" size="4" color="#0000ff">    testqe=IndexQueryEngine(voxel_<wbr>indices=Sphere(3))</font></div><div><font face="garamond, serif" size="4" color="#0000ff">    </font></div><div><font face="garamond, serif" size="4" color="#0000ff">    qe.append(testqe.query_byid)</font></div><div><font face="garamond, serif" size="4" color="#0000ff">    </font></div><div><font face="garamond, serif" size="4" color="#0000ff">qe_merged = [qe[0],qe[1],qe[2],qe[3]]</font></div><div><font color="#000000" face="garamond, serif" size="4"><br></font></div><div><font color="#000000" face="garamond, serif" size="4">ds_merged = [d[0],d[1],d[2],d[3]]</font></div></div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><br></div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">which I then was hoping to pass later onto </div><div style="font-family:garamond,serif;font-size:large"><div><font color="#000000">    slhyper = </font><font color="#0000ff">SearchlightHyperalignment(quer<wbr>yengine=qe_merged)</font></div><div style="color:rgb(0,0,0)"><br></div><div style="color:rgb(0,0,0)">however there does not appear to be an output for each of the 'qe' above, even though I can see the voxel_ids...</div><div style="color:rgb(0,0,0)"><br></div><div style="color:rgb(0,0,0)">any tips would be very useful!</div><div style="color:rgb(0,0,0)"><br></div><div style="color:rgb(0,0,0)">thanks!</div><div style="color:rgb(0,0,0)"><br></div></div></div><div class="gmail_extra"><br clear="all"><div><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><img alt="" style="color:rgb(0,0,0);font-family:garamond,serif;font-size:large;margin:0px 0.2ex;vertical-align:middle;min-height:24px;width:24px"><img alt="" style="color:rgb(0,0,0);font-family:garamond,serif;font-size:large;margin:0px 0.2ex;vertical-align:middle;min-height:24px;width:24px"><img alt="" style="color:rgb(0,0,0);font-family:garamond,serif;font-size:large;margin:0px 0.2ex;vertical-align:middle;min-height:24px;width:24px"><br><div>-------------------</div></div></div></div></div></div></div></div></div><div><div>
<br><div class="gmail_quote">On 1 August 2016 at 19:02, Swaroop Guntupalli <span dir="ltr"><<a href="mailto:swaroopgj@gmail.com" target="_blank">swaroopgj@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi David,<div><br></div><div>Thanks for the data. The issue is that when using searchlight hyperalignment without supplying queryengines but providing radius (as in your case), we compute a single spherical volume queryengine on the reference subject, which means all the datasets need to be aligned and have exact same number of features. The issue in your script is that you remove invariance features separately for each subject, which results in different  numbers of features for each subject. </div><div><br></div><div>There are two ways to resolve it:</div><div>1) after removing invariant features, supply list of spherical volume queryengines corresponding to subjects, or</div><div>2) find the union of invariant features in all subjects, and then remove the same set of features from all subjects, and proceed with hyperalignment as you have currently.</div><div><br></div><div>Hope that helps.</div><div>Best,</div><div>Swaroop</div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 1, 2016 at 6:30 AM, David Soto <span dir="ltr"><<a href="mailto:d.soto.b@gmail.com" target="_blank">d.soto.b@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><font color="#000000" face="garamond, serif" size="4">Hi Swaroop, I have run the analyses using the individual copes that were co-registered in FSL to the individual T1 (using BBR) and then to MNI2mm template using a 12 DOF.  The problem persists even after doing remove_invariant_features().</font></div><div><font color="#000000" face="garamond, serif" size="4">I get a similar  'Indexerror: index 226822 is out of bounds for axis 1 with size 198603'</font></div><div><font color="#000000" face="garamond, serif" size="4"><br></font></div><div><font color="#000000" face="garamond, serif" size="4">I have uploaded all the datafiles which you can find in the link below, just in case you could have a look. If you open the zip then you will find all the relevant files, including the pymvpa script that I use to run the analyses ('hyperalscript.py'), the individual data within a folder and also the attributes file and the MNI brain mask</font></div><div><font color="#000000" face="garamond, serif" size="4"><a href="https://drive.google.com/open?id=0B7-qbWx3g9KfUU1jOFVpQ05oRWM" target="_blank">https://drive.google.com/open?<wbr>id=0B7-qbWx3g9KfUU1jOFVpQ05oRW<wbr>M</a></font></div><div><font color="#000000" face="garamond, serif" size="4"><br></font></div><div><font color="#000000" face="garamond, serif" size="4">any help would be much appreciated...</font></div><div><font color="#000000" face="garamond, serif" size="4"><br></font></div><div><font color="#000000" face="garamond, serif" size="4">thanks!</font></div><span><font color="#888888"><div><font color="#000000" face="garamond, serif" size="4">david</font></div></font></span></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On 29 July 2016 at 18:28, Swaroop Guntupalli <span dir="ltr"><<a href="mailto:swaroopgj@gmail.com" target="_blank">swaroopgj@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">That is correct. But the searchlight centers across subjects are assumed to be aligned.<div><br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 29, 2016 at 8:24 AM, David Soto <span dir="ltr"><<a href="mailto:d.soto.b@gmail.com" target="_blank">d.soto.b@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">​Hi, thanks I will try that,  I understand therefore that the number of features per subject need not be equal across subjects for searchlight hyperalignment - but please correct me if am wrong.</div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">best</div><span><font color="#888888"><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">david</div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On 29 July 2016 at 16:17, Swaroop Guntupalli <span dir="ltr"><<a href="mailto:swaroopgj@gmail.com" target="_blank">swaroopgj@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi David,<div><br></div><div>If you are using searchlight hyperalignment, it is advisable to align the data across subjects using anatomy first. Simplest would be to be align them to an MNI template and then run the searchlight hyperalignment.</div><div>Our tutorial dataset is affine aligned to MNI template.</div><div><br></div><div>Best,</div><div>Swaroop</div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 28, 2016 at 10:51 AM, David Soto <span dir="ltr"><<a href="mailto:d.soto.b@gmail.com" target="_blank">d.soto.b@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">Thanks Swaroop, I managed to get the dataset in the right format as per the hyperaligmentsearchlight tutorial</div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">however when I run the hyperaligment I get the following error (<span style="font-size:13px;font-family:arial,sans-serif;color:rgb(34,34,34)">IndexError: index 46268 is out of bounds for axis 1 with size 43506, </span>see further below)...to recap the dataset is a concatenation of each subject data, each in individual native space, so number of features are different across subjects... </div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">The code I use is the same as in the tutorial, namely, any feedback would be great, thanks, david</div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">cv = CrossValidation(clf, NFoldPartitioner(attr='</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">subject<wbr>'),</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">                     errorfx=mean_match_accuracy)</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">for test_run in range(nruns):</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    ds_train = [sd[sd.sa.chunks != test_run, :] for sd in ds_all]</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    ds_test = [sd[sd.sa.chunks == test_run, :] for sd in ds_all]</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    slhyper = SearchlightHyperalignment(</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">radi<wbr>us=3, featsel=0.4, sparse_radius=3)</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    slhypmaps = slhyper(ds_train)</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    ds_hyper = [h.forward(sd) for h, sd in zip(slhypmaps, ds_test)]</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br></span></div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    ds_hyper = vstack(ds_hyper)</span><br><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    zscore(ds_hyper, chunks_attr='subject')</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    res_cv = cv(ds_hyper)</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    bsc_slhyper_results.append(</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">res<wbr>_cv)</span><br></div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><br></div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">OUTPUT MESSAGE.........</div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">Performing classification analyses...</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">  between-subject (searchlight hyperaligned)...</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">------------------------------</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><wbr>------------------------------</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><wbr>---------------</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">IndexError                                Traceback (most recent call last)</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><ipython-input-191-</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">85bdb873d4f<wbr>1> in <module>()</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">     24     # Searchlight Hyperalignment returns a list of mappers corresponding to</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">     25     # subjects in the same order as the list of datasets we passed in.</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">---> 26     slhypmaps = slhyper(ds_train)</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">     27</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">     28     # Applying hyperalignment parameters is similar to applying any mapper in</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">/usr/local/lib/python2.7/site-</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><wbr>packages/mvpa2/algorithms/</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">sear<wbr>chlight_hyperalignment.pyc in __call__(self, datasets)</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    626             node_blocks = np.array_split(roi_ids, params.nblocks)</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    627             p_results = [self._proc_block(block, datasets, hmeasure, queryengines)</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">--> 628                          for block in node_blocks]</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    629         results_ds = self.__handle_all_results(p_</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">re<wbr>sults)</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    630         # Dummy iterator for, you know, iteration</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">/usr/local/lib/python2.7/site-</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><wbr>packages/mvpa2/algorithms/</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">sear<wbr>chlight_hyperalignment.pyc in _proc_block(self, block, datasets, featselhyper, queryengines, seed, iblock)</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    387                 continue</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    388             # selecting neighborhood for all subject for hyperalignment</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">--> 389             ds_temp = [sd[:, ids] for sd, ids in zip(datasets, roi_feature_ids_all)]</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    390             if self.force_roi_seed:</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    391                 roi_seed = np.array(roi_feature_ids_all[</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">s<wbr>elf.params.ref_ds]) == node_id</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">/usr/local/lib/python2.7/site-</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><wbr>packages/mvpa2/datasets/base.</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">p<wbr>yc in __getitem__(self, args)</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    139</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    140         # let the base do the work</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">--> 141         ds = super(Dataset, self).__getitem__(args)</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    142</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    143         # and adjusting the mapper (if any)</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">/usr/local/lib/python2.7/site-</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><wbr>packages/mvpa2/base/dataset.</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">py<wbr>c in __getitem__(self, args)</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    445         if isinstance(self.samples, np.ndarray):</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    446             if np.any([isinstance(a, slice) for a in args]):</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">--> 447                 samples = self.samples[args[0], args[1]]</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    448             else:</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    449                 # works even with bool masks (although without</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">IndexError: index 46268 is out of bounds for axis 1 with size 43506</span><br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On 28 July 2016 at 00:25, Swaroop Guntupalli <span dir="ltr"><<a href="mailto:swaroopgj@gmail.com" target="_blank">swaroopgj@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi David, <div><br></div><div>If you have limited data, you can use a part of it (however you split the data for training and testing)<div>to train hyperalignment, and also use the same part to train the classifier and then apply hyperalignment and test classifier on the left-out part. Yes, you can artificially create 2 chunks (or more if you prefer). </div><div><br></div></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 27, 2016 at 3:17 PM, David Soto <span dir="ltr"><<a href="mailto:d.soto.b@gmail.com" target="_blank">d.soto.b@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><div>sounds great thanks, a further thing is that I have seen that in order to preclude  circularity issues, hyperalinment is implemented on a subset of training chunks and then the transformation is applied to the full datasets prior to classification analyses.  Given that I have no proper chunks/runs here, but only 56 betas across trials, would it be okay to train hyperaligment just on half of the 56 betas, eg artificially split the data set in 2 chunks  each containing 14 betas of class A and 14 of class B? Or would it be just OK to train hyperaligment on the 56 betas in the first instance?</div><div>thanks!</div><span><font color="#888888"><div>david</div></font></span></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On 28 July 2016 at 00:00, Swaroop Guntupalli <span dir="ltr"><<a href="mailto:swaroopgj@gmail.com" target="_blank">swaroopgj@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The hyperalignment example on PyMVPA uses one beta map for each category per run.</div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 27, 2016 at 2:57 PM, Swaroop Guntupalli <span dir="ltr"><<a href="mailto:swaroopgj@gmail.com" target="_blank">swaroopgj@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi David,<div><br></div><div>Beta maps should work fine for hyperalignment. The more maps (or TRs) there are, better the estimate.</div><div>We used within-subject hyperalignment in Haxby et al. 2011, which uses maps from 6 categories (we used 3 successive betas per condition I think).</div><div><br></div><div>vstack() merges multiple datasets into a single dataset, and if there is any voxel count (nfeatures) mismatch across subjects, it won't work (as evidenced by the error). </div><div>Hyperalignment takes in a list of datasets, one per each subject. </div><div>So, you can make that a list as </div><div>ds_all =[ds1, ds2, ...., ds16]</div><div>and use for Hyperalignment()</div><div><br></div><div>Best,</div><div>Swaroop</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Wed, Jul 27, 2016 at 2:28 PM, David Soto <span dir="ltr"><<a href="mailto:d.soto.b@gmail.com" target="_blank">d.soto.b@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">hi, </div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><br></div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">in my experiment I have 28 betas in condition A and 28 parameter estimate images and 28  in condition B for each subject (N=16 in total).</div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"> </div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">i have performed across-subjects SVM-based searchlight classification using MNI-registered individual beta images and I would like to repeat and confirm my results using searchlight based on hyperaligned data.</div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><br></div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">i am not aware of any paper using hyperaligment on  beta images but I think this should be possible, any advise please would be nice</div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><br></div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">i've created individual datasets concatenating the 28 betas in condition A and the 28 in condition (in the actual experiment condition A and B can appear randomly on each trial). I have 16 nifti datasets, one per subject, with each in individual native anatomical space. In trying to get a dataset in the same format as in the hyperlignment tutorial I use fmri_dataset on each individual wholebrain 48 betas  and then try to merged then all i.e. <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">ds_merged = vstack((d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15,d16)) but this gives the following error pasted at the end,</span></div><div style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">which I think it is becos the number of voxels is different across subjects. This is one issue.</div><div><font color="#000000" face="garamond, serif" size="4"><br></font></div><div><font color="#000000" face="garamond, serif" size="4">Another is that the function vstack does appear to produce the list of individual datasets that is in the hyperligment tutorial dataset, but a list of individual betas, I would be grateful to receive some tips.</font></div><div><font color="#000000" face="garamond, serif" size="4"><br></font></div><div><font color="#000000" face="garamond, serif" size="4">thanks!</font></div><div><font color="#000000" face="garamond, serif" size="4">david</font></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">------------------------------</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><wbr>------------------------------</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><wbr>---------------</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">ValueError                                Traceback (most recent call last)</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><ipython-input-64-</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">2fef46542bfc<wbr>> in <module>()</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">     19 h5save('/home/dsoto/dsoto/</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">fmri<wbr>/wmlearning/h5.hdf5', [d1,d2])</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">     20 #ds_merged = vstack((d1, d2, d3, d4, d5, d6, d7,d8,d9, d10, d11, d12, d13, d14, d15, d16))</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">---> 21 ds_merged = vstack((d1, d2))</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">/usr/local/lib/python2.7/site-</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><wbr>packages/mvpa2/base/dataset.</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">py<wbr>c in vstack(datasets, a)</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    687                              "datasets have varying attributes.")</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    688     # will puke if not equal number of features</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">--> 689     stacked_samp = np.concatenate([ds.samples for ds in datasets], axis=0)</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    690</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">    691     stacked_sa = {}</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">ValueError: all the input array dimensions except for the concatenation axis must match exactly</span><br></div></div>
<br></div></div>______________________________<wbr>_________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth<wbr>.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.org<wbr>/cgi-bin/mailman/listinfo/pkg-<wbr>exppsy-pymvpa</a><br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth<wbr>.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.org<wbr>/cgi-bin/mailman/listinfo/pkg-<wbr>exppsy-pymvpa</a><br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth<wbr>.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.org<wbr>/cgi-bin/mailman/listinfo/pkg-<wbr>exppsy-pymvpa</a><br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth<wbr>.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.org<wbr>/cgi-bin/mailman/listinfo/pkg-<wbr>exppsy-pymvpa</a><br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth<wbr>.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.org<wbr>/cgi-bin/mailman/listinfo/pkg-<wbr>exppsy-pymvpa</a><br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth<wbr>.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.org<wbr>/cgi-bin/mailman/listinfo/pkg-<wbr>exppsy-pymvpa</a><br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth<wbr>.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.org<wbr>/cgi-bin/mailman/listinfo/pkg-<wbr>exppsy-pymvpa</a><br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth<wbr>.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.org<wbr>/cgi-bin/mailman/listinfo/pkg-<wbr>exppsy-pymvpa</a><br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth<wbr>.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.org<wbr>/cgi-bin/mailman/listinfo/pkg-<wbr>exppsy-pymvpa</a><br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth<wbr>.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.org<wbr>/cgi-bin/mailman/listinfo/pkg-<wbr>exppsy-pymvpa</a><br></blockquote></div><br></div></div></div>
<br>______________________________<wbr>_________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth<wbr>.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.org<wbr>/cgi-bin/mailman/listinfo/pkg-<wbr>exppsy-pymvpa</a><br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth<wbr>.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.org<wbr>/cgi-bin/mailman/listinfo/pkg-<wbr>exppsy-pymvpa</a><br></blockquote></div><br></div></div></div></div>
<br>______________________________<wbr>_________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth<wbr>.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.org<wbr>/cgi-bin/mailman/listinfo/pkg-<wbr>exppsy-pymvpa</a><br></blockquote></div><br></div></div></div></div>
<br>______________________________<wbr>_________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth<wbr>.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.org<wbr>/cgi-bin/mailman/listinfo/pkg-<wbr>exppsy-pymvpa</a><br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.<wbr>alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.<wbr>org/cgi-bin/mailman/listinfo/<wbr>pkg-exppsy-pymvpa</a><br></blockquote></div><br></div>