[pymvpa] SMLR weights
Daqiang Sun
sundaqiang at yahoo.com
Sat Jan 24 00:36:21 UTC 2009
Hi, Thanks for your quick response!
The save method is a nice trick, and it makes sense to use samples only for prediction.
Yeah the dot_prod is not that important. I just tried to get a little more idea about how it works.
Have a nice weekend!
Best, Frank
----- Original Message ----
From: Yaroslav Halchenko <debian at onerussian.com>
To: pkg-exppsy-pymvpa at lists.alioth.debian.org
Sent: Friday, January 23, 2009 4:21:20 PM
Subject: Re: [pymvpa] SMLR weights
> Now I am trying to save 'sens' as a Nifti image and see where these selected voxels are located.
> My dataset is from a 4D image including 3D structural images. I did:
> sens3d= dataset.mapReverse(sens)
> NiftiImage(sens3d).save('sens.nii.gz')
> would this give a 3D image with correct orientation?
should work but loose all header information you head in dataset (is
dataset a NiftiDataset btw?)
if dataset is indeed NiftiDataset, you can simply do
dataset.map2Nifti(sens3d).save('buga.nii.gz')
doc/examples/searchlight.py might be an example
> 2. To get the 'decision values' following Michael suggestion, I found
> that the input data for clf.predict() cannot be an NiftiDataset but
> should be an array.
correct, dataset.samples should be provided into predict()s
> Would clf.predict(dataset.samples) do the right
> job? I'm a bit confused about data conversion.
yeah ;-)
the reason is
for training we do need samples + labels + chunks, since we do supervised
learning, but for prediction we need just samples, and to assure that
none of the 'predict()s' cheat on us (ie looks up the labels), we
enforced that predict should obtain only samples
> 3. By checking the SMLR code, I saw after getting the dot_prod (linear
> combination), there are further transformations to generate the 'values'.
> I guess this is why I couldn't get a group separation using the dot products.
I am not sure what dot-products are of interest here...
--
Yaroslav Halchenko
Research Assistant, Psychology Department, Rutgers-Newark
Student Ph.D. @ CS Dept. NJIT
Office: (973) 353-1412 | FWD: 82823 | Fax: (973) 353-1171
101 Warren Str, Smith Hall, Rm 4-105, Newark NJ 07102
WWW: http://www.linkedin.com/in/yarik
_______________________________________________
Pkg-ExpPsy-PyMVPA mailing list
Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa
More information about the Pkg-ExpPsy-PyMVPA
mailing list