Hi Michael,<br><br>I tried running the script on other datasets and they seem to work fine. I&#39;ve run into this sort of thing several times so far with PyMVPA (i.e., cases where a classifier will run for one subject but crash for others). <br>


<br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">Did you inspect the dataset that it is somewhat &quot;sane&quot;? What does<br>
  print blockavged_dataset.summary()
say?<br></blockquote><br>Yes, the data looks fine. In fact, I&#39;ve run the same data with several other classifiers and they worked fine. Further, the data will run with the searchlight for several spheres, and only crash when it hits an especially small one (4 voxels). I&#39;m not sure if it&#39;s an issue with the number of voxels or not. (I imagine it must&#39;ve hit similarly small feature sets for the other subjects it worked for.)<br>

<br>Any idea what could be causing this?<br><br>Michael<br><br><br><br><br><br><div class="gmail_quote">On Wed, Dec 16, 2009 at 4:15 PM, Michael Hanke <span dir="ltr">&lt;<a href="mailto:michael.hanke@gmail.com" target="_blank">michael.hanke@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hey,<br>
<br>
[ sorry for the delay ]<br>
<div><br>
On Wed, Dec 16, 2009 at 12:04:28PM +0100, Valentin Haenel wrote:<br>
&gt; Would anyone of the senior developers like to comment on this, please.<br>
<br>
</div>You&#39;re senior too -- no? ;-)<br>
<div><div></div><div><br>
&gt; * Michael W. Cole &lt;<a href="mailto:mwcole@gmail.com" target="_blank">mwcole@gmail.com</a>&gt; [091214]:<br>
&gt; &gt; Hello Valentin,<br>
&gt; &gt;<br>
&gt; &gt; Thanks for the reply.<br>
&gt; &gt;<br>
&gt; &gt; I&#39;m including the requested info:<br>
&gt; &gt; PyMVPA 0.4.3 on Fedora 10 x86_64.<br>
&gt; &gt;<br>
&gt; &gt; Here is the relevant part of the script:<br>
&gt; &gt;<br>
&gt; &gt;     blockavged_dataset = NiftiDataset(samples=niftiFile,<br>
&gt; &gt; &gt;         labels=attrs.labels, chunks=attrs.chunks, labels_map={&#39;cat1&#39;: 0,<br>
&gt; &gt; &gt; &#39;cat2&#39;: 1, &#39;cat3&#39;: 2, &#39;cat4&#39;: 3, &#39;cat5&#39;: 4},<br>
&gt; &gt; &gt;         mask=maskFile)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;     # remove first category from dataset<br>
&gt; &gt; &gt;     blockavged_dataset = blockavged_dataset.selectSamples(N.array([l != 0<br>
&gt; &gt; &gt; for l in blockavged_dataset.labels],<br>
&gt; &gt; &gt;                                             dtype=&#39;bool&#39;))<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;     &quot;&quot;&quot;Create a dissimilarity matrix based on the labels of the data points<br>
&gt; &gt; &gt;     in our test dataset.  This will allow us to see if there is a<br>
&gt; &gt; &gt; correlation<br>
&gt; &gt; &gt;     between any given searchlight sphere and the experimental<br>
&gt; &gt; &gt; conditions.&quot;&quot;&quot;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;     # create dissimilarity matrix using the &#39;confusion&#39; distance<br>
&gt; &gt; &gt;     # metric<br>
&gt; &gt; &gt;     dsm = DSMatrix(blockavged_dataset.labels, &#39;confusion&#39;)<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;     #<br>
&gt; &gt; &gt;     # Run Searchlight<br>
&gt; &gt; &gt;     #<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;     # choose classifier<br>
&gt; &gt; &gt;     dsmetric = DSMDatasetMeasure(dsm, &#39;pearson&#39;, &#39;pearson&#39;)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;     for radius in [6.4,9.6]:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;         # tell which one we are doing<br>
&gt; &gt; &gt;         print &quot;Running searchlight with radius: %.2fmm...&quot; % (radius)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;         # setup Searchlight with a custom radius<br>
&gt; &gt; &gt;         # radius has to be in the same unit as the nifti file&#39;s pixdim<br>
&gt; &gt; &gt;         # property.<br>
&gt; &gt; &gt;         sl = Searchlight(dsmetric, radius=radius)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;         # run searchlight on example dataset and retrieve error map<br>
&gt; &gt; &gt;         sl_map = sl(blockavged_dataset)<br>
<br>
</div></div>From just looking at it I have no clue what is wrong. Except for the<br>
dataset used this code is almost identical to the searchlight_dsm.py<br>
example. Does that one run for you?<br>
<br>
Did you inspect the dataset that it is somewhat &quot;sane&quot;? What does<br>
<br>
  print blockavged_dataset.summary()<br>
<br>
say?<br>
<br>
<br>
Michael<br>
<font color="#888888"><br>
<br>
--<br>
GPG key:  1024D/3144BE0F Michael Hanke<br>
<a href="http://mih.voxindeserto.de" target="_blank">http://mih.voxindeserto.de</a><br>
</font><div><div></div><div><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/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Michael W. Cole, Ph.D.<br>Post-doctoral researcher<br>Cognitive Control &amp; Psychopathology Lab<br>Washington University in St. Louis<br>