 TDT - Representational Similarity Analysis (RSA)

Hello Everyone,

I am new to RSA (and fMRI) and I am using The Decoding Toolbox (TDT). I am first running analysis on a unique subject to explore the TDT.

I have two (simple) questions:

(1) How do I average condition across run? I have 4 runs with 13 conditions but at the end I get a 52x52 matrix, while I would like a 13x13. I already tried: cfg.results.output = ‘other_average’ and cfg.results.output = ‘other’, with the same result. Do I have to average the beta values prior to the TDT?

(2) I get the outputs as 41376 matrix of 52x52. I would like to know if it is possible to use matlab and/or TDT to understand which voxels corresponds to each matrix. And/or if we have to use SPM (or other software) to analyse the results.

Here is how I am using the TDT:
I did the pre-processing and got the beta values.

cfg = decoding_defaults;
cfg.results.overwrite = 1;
cfg.analysis = ‘searchlight’;
cfg.results.dir = …directory
beta_loc = …directory

labelname1 = ‘NAbstractEmo’;
labelname2 = ‘NAbstractInternal’;
labelname3 = ‘NFace’;
labelname4 = ‘NHand’;
labelname5 = ‘NAnimal’;
labelname6 = ‘NFiller’;
labelname7 = ‘VAbstractEmo’;
labelname8 = ‘VAbstractInternal’;
labelname9 = ‘VFace’;
labelname10 = ‘VHand’;
labelname11 = ‘VFoot’;
labelname12 = ‘VNature’;
labelname13 = ‘Hashmarks’;

cfg.decoding.software = ‘similarity’;
cfg.decoding.method = ‘classification’;
cfg.decoding.train.classification.model_parameters = ‘pearson’; % this is pearson correlation
cfg.results.output = ‘other_average’;
cfg.scale.method = ‘min0max1’;
cfg.scale.estimation = ‘all’; % scaling across all data is equivalent to no scaling (i.e. will yield the same results), it only changes the data range which allows libsvm to compute faster
cfg.plot_selected_voxels = 0; % 0: no plotting, 1: every step, 2: every second step, 100: every hundredth step…
regressor_names = design_from_spm(beta_loc);
cfg = decoding_describe_data(cfg,{labelname1 labelname2 labelname3 labelname4 labelname5 labelname6 labelname7 labelname8 labelname9 labelname10 labelname11 labelname12 labelname13},[1 2 3 4 5 6 7 8 9 10 11 12 13],regressor_names,beta_loc);
cfg.design = make_design_similarity(cfg);
results = decoding(cfg);

Thank you in advance and have a good day Maxime

MANAGED BY INCF