Discussion:
[pymvpa] How to save hyperalignment mapper
Dmitrii Paniukov
2018-11-01 17:05:23 UTC
Permalink
Hello all,

Does anyone know how to save a hyperalignment mapper? So it can be used
later.

I'm reusing the tutorial code:
slhyper = SearchlightHyperalignment(radius=3, featsel=0.4, sparse_radius=3)
slhypmaps = slhyper(ds_train)

How do I save the slhypmaps, so I can use it later as in:
ds_hyper = [h.forward(sd) for h, sd in zip(slhypmaps, ds_test)]
ds_orig = [h.reverse(sd) for h, sd in zip(slhypmaps, ds_hyper)]

By the way, am I using the reverse transform correctly?

Thanks for any suggestions!
Dmitrii
Beau R. Sievers
2018-11-01 19:41:51 UTC
Permalink
Hi Dmitrii,

For saving the maps, I think you can just:

import mvpa2.suite as mv
...
mv.h5save(output_path, slhypmaps)

Best,
Beau
Post by Dmitrii Paniukov
Hello all,
Does anyone know how to save a hyperalignment mapper? So it can be used later.
slhyper = SearchlightHyperalignment(radius=3, featsel=0.4, sparse_radius=3)
slhypmaps = slhyper(ds_train)
ds_hyper = [h.forward(sd) for h, sd in zip(slhypmaps, ds_test)]
ds_orig = [h.reverse(sd) for h, sd in zip(slhypmaps, ds_hyper)]
By the way, am I using the reverse transform correctly?
Thanks for any suggestions!
Dmitrii
_______________________________________________
Pkg-ExpPsy-PyMVPA mailing list
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Falioth-lists.debian.net%2Fcgi-bin%2Fmailman%2Flistinfo%2Fpkg-exppsy-pymvpa&data=02%7C01%7Cbeau.r.sievers.gr%40dartmouth.edu%7Cea9f301adaba4eb5c98208d6401ffb9d%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C636766903445566484&sdata=4%2FKf47vq6Lbi0L1kuOUnSd5e8dkl5vy6RsJEK3XvVKk%3D&reserved=0
Dmitrii Paniukov
2018-11-01 21:15:49 UTC
Permalink
Great! That worked fine, thanks!

On Thu, Nov 1, 2018 at 3:14 PM Beau R. Sievers <
Post by Beau R. Sievers
Hi Dmitrii,
import mvpa2.suite as mv
...
mv.h5save(output_path, slhypmaps)
Best,
Beau
Post by Dmitrii Paniukov
Hello all,
Does anyone know how to save a hyperalignment mapper? So it can be used
later.
Post by Dmitrii Paniukov
slhyper = SearchlightHyperalignment(radius=3, featsel=0.4,
sparse_radius=3)
Post by Dmitrii Paniukov
slhypmaps = slhyper(ds_train)
ds_hyper = [h.forward(sd) for h, sd in zip(slhypmaps, ds_test)]
ds_orig = [h.reverse(sd) for h, sd in zip(slhypmaps, ds_hyper)]
By the way, am I using the reverse transform correctly?
Thanks for any suggestions!
Dmitrii
_______________________________________________
Pkg-ExpPsy-PyMVPA mailing list
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Falioth-lists.debian.net%2Fcgi-bin%2Fmailman%2Flistinfo%2Fpkg-exppsy-pymvpa&amp;data=02%7C01%7Cbeau.r.sievers.gr%40dartmouth.edu%7Cea9f301adaba4eb5c98208d6401ffb9d%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C636766903445566484&amp;sdata=4%2FKf47vq6Lbi0L1kuOUnSd5e8dkl5vy6RsJEK3XvVKk%3D&amp;reserved=0
_______________________________________________
Pkg-ExpPsy-PyMVPA mailing list
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa
Loading...