[pymvpa] classification based on individual parameter estimates from FSL

David Soto d.soto.b at gmail.com
Tue Jul 15 23:11:23 UTC 2014


Hi, I hope you have enjoyed the worldcup :)

I am trying a searchlight pipeline for the first time now,  it has been
running
for some 6-8 hours and remains on with little RAM and CPU used . To
recapitulate, I am training a SVM on FSL copes from task A
regarding classes X & Y and then testing the model on FSL copes from task B
regarding the same classes.
The shape of training and testing datasets is  (304, 902629)

My searchlight pipeline is the following, would you please let me know if
this is OK?
cheers,
ds

from mvpa2.suite import *

datapath1='/home/dsoto/Documents/fmri/rawprepro_wmintrosp'

attr = SampleAttributes(os.path.join(datapath1, 'attr.txt'))

ds = fmri_dataset(samples=os.path.join(datapath1, 'bold_taska.nii.gz'),

targets=attr.targets, chunks=attr.chunks)

 ts = fmri_dataset(samples=os.path.join(datapath1, 'bold_taskb.nii.gz'),

targets=attr.targets, chunks=attr.chunks)

zscore(ds)

zscore(ts)


clf= LinearCSVMC()

clf.train(ds)

predictions = clf.predict(ts.samples)

#validation= np.mean(predictions== ts.sa.targets)

sl = sphere_searchlight(predictions, radius=3, space='voxel_indices',

postproc=mean_sample())

sl_map = sl(ds)



the ipython gui currently says


*[SLC] DBG:                            Starting off 4 child processes for
nblocks=4*


On Fri, Jul 4, 2014 at 2:44 PM, David Soto <d.soto.b at gmail.com> wrote:

> great thanks!
>
> best of luck in the semifinals!
>
> cheers
> ds
>
>
> On Fri, Jul 4, 2014 at 2:33 PM, Michael Hanke <mih at debian.org> wrote:
>
>> Hi,
>>
>> On Tue, Jul 01, 2014 at 12:25:40AM +0100, David Soto wrote:
>> > Hi Michael, indeed ..well done for germany today! :).
>> > Thanks for the reply and the suggestion on KNN
>> > I should have been  more clear that for each subject I have the
>> > following *block
>> > *sequences
>> > ababbaabbaabbaba in TASK 1
>> > ababbaabbaabbaba in TASK 2
>> >
>> > this explains that I have  8 a-betas and 8 b-betas for each task
>> > AND for each subject..so if i concatenate & normalize all the beta data
>> > across subjects I will have 8 x 19 (subjects)= 152 beta images for
>> class a
>> > and the same for class b
>>
>> Ah, I guess you model each task with two regressors (hrf + derivative?).
>> You can also use a basis function set and get even more betas...
>> >
>> > then could I use SVM searchlight trained to discriminate a from b in
>>  task1
>> > betas and tested in the task2 betas?
>>
>> yes, no problem.
>>
>> Cheers,
>>
>> Michael
>>
>> PS: Off to enjoy the quarter finals ... ;-)
>>
>>
>> --
>> Michael Hanke
>> http://mih.voxindeserto.de
>>
>> _______________________________________________
>> Pkg-ExpPsy-PyMVPA mailing list
>> Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa
>>
>
>
>
> --
> http://www1.imperial.ac.uk/medicine/people/d.soto/
>



-- 
http://www1.imperial.ac.uk/medicine/people/d.soto/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20140716/82c466e5/attachment.html>


More information about the Pkg-ExpPsy-PyMVPA mailing list