<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif;font-size:large;color:rgb(0,0,0)">Thanks Nick and Gavin for the helpful feedback!<br><br>for some reason the maptonifti works fine with the output of the searchlight (eg img=map2nifti(sl_res) gives the same as  img=map2nifti(dataset=ds, data=sl_res).<br>
<br>I think this may be the header info was incorporated in the fmri_dataset call by adding the mask and the add_fa<br>ds = fmri_dataset(samples=os.path.join(datapath1, 'predbothsi.nii.gz'),<br>                  targets=attr.targets, chunks=attr.chunks,<br>
                  mask=os.path.join(datapath1, 'mask.nii.gz'),#based on FEAT analyses<br>                  add_fa={'unmbral_glm': os.path.join(datapath1, 'mask.nii.gz')}) .<br><br></div><div class="gmail_default" style="font-family:georgia,serif;font-size:large;color:rgb(0,0,0)">
What is intriguing is that the output of the FEAT GLM gives a robust univariate signal in visual cortex for the contrast a vs. b in task 1 and for a vs. b in task 2.<br></div><div class="gmail_default" style="font-family:georgia,serif;font-size:large;color:rgb(0,0,0)">
Yet I tried with different searchlight radius and only get near chance classification<br></div><div class="gmail_default" style="font-family:georgia,serif;font-size:large;color:rgb(0,0,0)">from task1 to task 2.....I guess this could simply mean the patterns of responses in visual cortex are very different across task contexts, yet the signal associated with activation level is picked up by the GLM?<br>
<br></div><div class="gmail_default" style="font-family:georgia,serif;font-size:large;color:rgb(0,0,0)">if so would it be reasonable to investigate this further for instance by deriving similarity matrices across individual <br>
parameter estimates for task 1 and task 2?<br><br></div><div class="gmail_default" style="font-family:georgia,serif;font-size:large;color:rgb(0,0,0)">cheers<br><br></div><div class="gmail_default" style="font-family:georgia,serif;font-size:large;color:rgb(0,0,0)">
ds <br></div><div class="gmail_default" style="font-family:georgia,serif;font-size:large;color:rgb(0,0,0)"><br><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 1, 2014 at 10:35 PM, Hanson, Gavin Keith <span dir="ltr"><<a href="mailto:ghanson0@ku.edu" target="_blank">ghanson0@ku.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word">
Hi David,
<div><br>
</div>
<div>When you use map2nifti to get an image of your searchlight, if requires 2 inputs.</div>
<div>img=map2nifti(dataset=ds, data=sl_res))</div>
<div>img.to_filename(‘foo.nii.gz’)</div>
<div>So once you run your searchlight like you have it set up (though I’m not sure that what you’re doing with those center_ids is necessary), just pass your original dataset to the map2nifti function along with your res dataset to the ‘data=' argument.</div>

<div><br>
</div>
<div>Only the original dataset contains the mapper info that allows you to recapitulate the 3D image, while the second argument, data, will take a result from a searchlight (or any vector/matrix of the right shape).</div>

<div>Hopefully that’ll help you get your searchlight into a form you can visualize. </div>
<div>- Gavin</div>
<div><br>
</div>
<div>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</div>
<div><div class="">Gavin Hanson, B.S.<br>
Research Assistant<br>
Department of Psychology<br>
University of Kansas<br></div>
1415 Jayhawk Blvd., 534 Fraser Hall <br>
Lawrence, KS 66045</div><div><div class="h5">
<div><br>
<div>
<div>On Aug 1, 2014, at 4:29 AM, David Soto <<a href="mailto:d.soto.b@gmail.com" target="_blank">d.soto.b@gmail.com</a>> wrote:</div>
<br>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-family:georgia,serif;font-size:large">
Thanks for the response, I have not managed to extract the whole-brain classification map...following the 1st example code below, the output from the crossvalidation is<br>
Dataset(array([[ 0.35526316],<br>
       [ 0.35855263]]), sa=SampleAttributesCollection(items=[ArrayCollectable(name='cvfolds', doc=None, value=array([0, 1]), length=2)]), fa=FeatureAttributesCollection(items=[]), a=DatasetAttributesCollection(items=[]))<br>

<br>
</div>
<div class="gmail_default" style="font-family:georgia,serif;font-size:large">
How can i extract the whole brain classification map? Using niftires does not work either
<br>
niftires = map2nifti(res)
<p style="margin:0px;text-indent:0px"></p>
<div style="margin:0px;text-indent:0px">niftires.to_filename('/home/dsoto/Documents/fmri/wholebrainsearchlight_results.nii.gz')</div>
<div style="margin:0px;text-indent:0px"><br>
</div>
<div style="margin:0px;text-indent:0px">Cheers</div>
<div style="margin:0px;text-indent:0px">ds<br>
</div>
<p style="margin:0px;text-indent:0px"></p>
<br>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Fri, Aug 1, 2014 at 9:41 AM, Nick Oosterhof <span dir="ltr">
<<a href="mailto:nikolaas.oosterhof@unitn.it" target="_blank">nikolaas.oosterhof@unitn.it</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br>
On Jul 31, 2014, at 10:49 PM, David Soto <<a href="mailto:d.soto.b@gmail.com" target="_blank">d.soto.b@gmail.com</a>> wrote:<br>
<br>
> Hi, I keep plugging away with this pretty basic classification<br>
</div>
> [...]<br>
<div>> I get a whole-brain classification accuracy of around 68%<br>
> (though did not assess significance)<br>
> Then I run a searchlight analyses and looking at the classification accuracy maps it appears like a chance distribution with mean 50% and the max classification accuracy<br>
> around 56%- I wonder how it be that none of the searchlights reaches the level of wholebrain classification ? and if this is the case then can it be the wholebrain classification meaningful at all?<br>
<br>
</div>
That is quite possible because the whole-brain classification uses many more features than each searchlight.<br>
<br>
Assuming there is sufficient signal in the data (which there seems to be in your case) which is not limited to a small subset of features (voxels), generally one sees better classification with more features. This was already reported by Cox et al 2003, and
 later by e.g. [disclaimer: shameless self promotion] Oosterhof et al 2011. (there are some cases where this might not be true)<br>
<br>
There's often tradeoff between spatial selectivity and classification accuracy. In one extreme you use all features for a single classification analysis (i.e. your whole-brain classification), in the other extreme you use one feature at a time (i.e., univariate
 analysis). A searchlight analysis is somewhere in between, finding a compromise between getting high classification accuracy and good spatial selectivity. But also for a searchlight it holds that neighborhood (sphere or disc) size can affect both classification
 accuracy and spatial selectivity.<br>
<div>
<div><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>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
<div dir="ltr"><a href="http://www1.imperial.ac.uk/medicine/people/d.soto/" style="color:rgb(17,85,204)" target="_blank">http://www1.imperial.ac.uk/medicine/people/d.soto/</a><br>
</div>
</div>
_______________________________________________<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></blockquote>
</div>
<br>
</div>
</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><br clear="all">
<br>-- <br><div dir="ltr"><a href="http://www1.imperial.ac.uk/medicine/people/d.soto/" style="color:rgb(17,85,204)" target="_blank">http://www1.imperial.ac.uk/medicine/people/d.soto/</a><br></div>
</div>