<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>thanks that is useful, however to clarify I meant it to be in the context of a representational similarity analyses</div><div>so would this solution be similar option 7  in here ? http://www.pymvpa.org/generated/mvpa2.measures.rsa.pdist.html</div><div>how about if I wanted to use a euclidean distance? not sure it could handle 2 spatio-temporal matrices </div><div>best</div><div>david</div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>From: </b>"Brian Murphy" <brian.murphy@qub.ac.uk><br><b>To: </b>"Development and support of PyMVPA" <pkg-exppsy-pymvpa@lists.alioth.debian.org><br><b>Sent: </b>Friday, October 28, 2016 9:58:45 PM<br><b>Subject: </b>Re: [pymvpa] correlation between 2 matrices<br></div><br><div data-marker="__QUOTED_TEXT__"><p>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.</p>
    <p>np.corrcoef(np.array(matrix1).flatten(),
      np.array(matrix2).flatten())</p>
    <p>... assuming you're using the matrix datatype. If they are
      vanilla 2D arrays, then you shouldn't need to recast:<br>
    </p>
    <p>np.corrcoef(matrix1.flatten(), matrix2.flatten())</p>
    <p>best,</p>
    <p>Brian</p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 28/10/16 20:44, David Soto wrote:<br>
    </div>
    <blockquote cite="mid:CAPeRSSW8gGwdwkyZfbq2S2MCzfN2+=V5aWBSVZc7yR012FVVEQ@mail.gmail.com">
      
      <div dir="ltr">
        <div class="gmail_default" style="font-family: garamond,serif; font-size: large; color: #000000;" data-mce-style="font-family: garamond,serif; font-size: large; color: #000000;">hi, </div>
        <div class="gmail_default" style="font-family: garamond,serif; font-size: large; color: #000000;" data-mce-style="font-family: garamond,serif; font-size: large; color: #000000;"><br>
        </div>
        <div class="gmail_default" style="font-family: garamond,serif; font-size: large; color: #000000;" data-mce-style="font-family: garamond,serif; font-size: large; color: #000000;">I
          wonder whether PyMVPA can compute a similarity index
          (correlation) between two 2D matrices, each comprised of 12
          seconds & 300 voxels?</div>
        <div class="gmail_default" style="font-family: garamond,serif; font-size: large; color: #000000;" data-mce-style="font-family: garamond,serif; font-size: large; color: #000000;"><br>
        </div>
        <div class="gmail_default" style="font-family: garamond,serif; font-size: large; color: #000000;" data-mce-style="font-family: garamond,serif; font-size: large; color: #000000;">thanks!</div>
        <div class="gmail_default" style="font-family: garamond,serif; font-size: large; color: #000000;" data-mce-style="font-family: garamond,serif; font-size: large; color: #000000;">david</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre>_______________________________________________
Pkg-ExpPsy-PyMVPA mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a>
<a class="moz-txt-link-freetext" 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></pre>
    </blockquote>
    <br>
  

<br>_______________________________________________<br>Pkg-ExpPsy-PyMVPA mailing list<br>Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org<br>http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa<br></div></div></body></html>