Dissimilarity vs Similarity Searchlight question

97 views
Skip to first unread message

cm...@psu.edu

unread,
Feb 22, 2024, 4:07:49 PM2/22/24
to CoSMoMVPA
Hi Nick,

I am trying to implement an RSM searchlight with my own data, and was trying to understand at what point the correlations are subtracted from 1 to create a dissimilarity value in the matrix. We are just trying to look at the similarity between 2 different conditions via an RSA searchlight.  

When I read through the cosmo_target_dsm_corr_measure function documentation, it doesn't seem like these correlations are actually subtracted from 1, so is that something we do manually if we are interested in dissimilarity versus similarity values?  

Best,
Cat 

Nick Oosterhof

unread,
Feb 23, 2024, 2:43:57 PM2/23/24
to cm...@psu.edu, CoSMoMVPA
Greetings,


On Feb 22, 2024, at 22:07, cm...@psu.edu wrote:

I am trying to implement an RSM searchlight with my own data, and was trying to understand at what point the correlations are subtracted from 1 to create a dissimilarity value in the matrix. We are just trying to look at the similarity between 2 different conditions via an RSA searchlight.  

When I read through the cosmo_target_dsm_corr_measure function documentation, it doesn't seem like these correlations are actually subtracted from 1, so is that something we do manually if we are interested in dissimilarity versus similarity values?  

cosmo_target_dsm_corr_measure uses cosmo_pidst to compute the distances between samples, see line:

183     samples_pdist = cosmo_pdist(samples, params.metric)’;

In cosmo_pist, in the case of ‘correlation’ distance, see line:

 80             d=1-dfull(msk)’;

which shows the subtraction from one.

Also, I have serious doubts whether two conditions is enough for RSA, as there is only one off-diagonal element. There are other multivariate methods would appear preferable.

cm...@psu.edu

unread,
Feb 26, 2024, 2:29:15 PM2/26/24
to CoSMoMVPA
Thank you Nick!

So in this case, would higher values from this computation indicate greater similiarity? Or dissimilarity?

And if it is the latter, do I need to remove the 1- part to compute similarity?

Best,
Cat

Nick Oosterhof

unread,
Feb 27, 2024, 3:42:19 PM2/27/24
to Carpenter, Catherine, CoSMoMVPA

On Feb 26, 2024, at 20:29, cm...@psu.edu wrote:

So in this case, would higher values from this computation indicate greater similiarity? Or dissimilarity?

And if it is the latter, do I need to remove the 1- part to compute similarity?

cosmo_pdist returns a dissimilarity matrix.

The typical use of the cosmo_target_dsm_corr_measure functions is to return a ’similarity score’ (higher means more similar) that reflects the similarity between:

1) a neural dissimilarity matrix, such as computed from cosmo_pdist. (more precisely, the vectorized form of the elements above the diagonal such a dissimilarity matrix), and
2) a target (model) dissimilarity matrix, for example from behavioural ratings.


Reply all
Reply to author
Forward
Message has been deleted
0 new messages