Representational similarity analysis (RSA) in python



Hi All,

I am not sure whether this is the right forum for this question, but I was wondering if anyone knew about a toolbox in python for RSA analysis similar to the RSA toolbox for Matlab developed by Nili and others?

Thanks for your help,



Hi Sebastian. I am not an expert in the field; however take a look at this.


Thanks @pog87. I know about pymvpa but it seems to focus more on classification analysis and is not so much targeted at RSA. In the RSA toolbox they implement mutlivariate noise normalization and cross validated mahalanobis distance for RSA analyses as proposed in :

which are as far as I know not implented in pymvpa…


Hi @Sebastian,

in PyMVPA we have measures to perform RSA (see here:, in particular we did recently implement a CDist class to run a form of cross-validated RSA without multivariate noise normalization. That said, what is currently implemented is not comparable to the MATLAB RSA toolbox, in that we don’t have methods (yet) to compute crossnobis distances. There is an open PR ( that aims at implementing it, but it’s still a work in progress.

I’m not aware of other toolbox in Python to do crossnobis in python for fmri data.