[pymvpa] correlation between 2 matrices
David Soto
d.soto at bcbl.eu
Sun Oct 30 22:14:09 UTC 2016
apparently there seems to be a way of using in-house pymvpa tools to do representational similarity of spatio-temporal events
(i) segment my timeseries data into the relevant spatio-temporal events with 'extract_boxcar_event_samples'
(ii) flat the space-time matrices to plain vectors (as reccomended before in this post)
(iii) set these to 'chunks' for the subsequent RSA analyis
(iii) run 'rsa.PDist' on those vectors
this approach would tell me the extent to which my ROI is modulated by spatio-temporal features of my stimulus
does this sonds right?
thanks!
david
From: "David Soto" <d.soto at bcbl.eu>
To: "Development and support of PyMVPA" <pkg-exppsy-pymvpa at lists.alioth.debian.org>
Sent: Friday, October 28, 2016 11:24:07 PM
Subject: Re: [pymvpa] correlation between 2 matrices
thanks that is useful, however to clarify I meant it to be in the context of a representational similarity analyses
so would this solution be similar option 7 in here ? http://www.pymvpa.org/generated/mvpa2.measures.rsa.pdist.html
how about if I wanted to use a euclidean distance? not sure it could handle 2 spatio-temporal matrices
best
david
From: "Brian Murphy" <brian.murphy at qub.ac.uk>
To: "Development and support of PyMVPA" <pkg-exppsy-pymvpa at lists.alioth.debian.org>
Sent: Friday, October 28, 2016 9:58:45 PM
Subject: Re: [pymvpa] correlation between 2 matrices
If I understand your query correctly, I think numpy could do it, first by flattening the matrices to simple vectors, and then calculating the correlation between those, e.g.
np.corrcoef(np.array(matrix1).flatten(), np.array(matrix2).flatten())
... assuming you're using the matrix datatype. If they are vanilla 2D arrays, then you shouldn't need to recast:
np.corrcoef(matrix1.flatten(), matrix2.flatten())
best,
Brian
On 28/10/16 20:44, David Soto wrote:
hi,
I wonder whether PyMVPA can compute a similarity index (correlation) between two 2D matrices, each comprised of 12 seconds & 300 voxels?
thanks!
david
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20161030/9964e69e/attachment.html>
More information about the Pkg-ExpPsy-PyMVPA
mailing list