rsagroup / rsatoolbox

Python library for Representational Similarity Analysis
MIT License
188 stars 37 forks source link

time-resolved noise matrix in calc_rdm_movie #235

Open silviaformica opened 2 years ago

silviaformica commented 2 years ago

Dear developers, I am using your toolbox to analyze my EEG data. What I want to achieve is to compute RDMs over time, using the crossnobis option of the function calc_rdm_movie. My cv descriptor is the run the trial belongs to (n_run = 2).

I want to add in my computation a multivariate noise matrix. I can compute it successfully for one time point (or over an averaged time window) using prec_from_measurements(). However, it seems to me that only one matrix per cross validation fold can be passed to calc_rdm_movie. Am I right? I would like the noise matrix to be computed for each time point. Maybe this option is already possible, but I am missing how to implement it.

Looking forward to any suggestion, also if my approach is wrong! (I am really new to this type of analysis) Thanks a lot, Silvia

JasperVanDenBosch commented 2 years ago

Thanks for your suggestion @silviaformica

@Benjamin-Peters since you know the movie code best, do you think this is feasible?

JasperVanDenBosch commented 2 years ago

Hi @silviaformica

Sorry for taking so long to reply to you. The noise argument passed to calc_rdm_movie does take into account time, which should be represented as the first dimension of the noise array. The next one is then for crossvalidation folds. calc_rdm_movie simply passes each slice to the calc_rdm_crossnobis function. Does this make sense? Jasper

Benjamin-Peters commented 2 years ago

I think we could make this more user-friendly by:

Benjamin