[FieldTrip] Plot classifier weights' topography
Barnett, Benjy
benjy.barnett.20 at ucl.ac.uk
Fri Mar 5 15:18:30 CET 2021
Hi!
I am trying to plot the topography of my LDA weights, but am having some trouble. I am using my own script to calculate the weights rather than any packages (e.g. DMLT, or MVPA-light), so the tutorials on the fieldtrip site haven’t been able to help me. So far, I’ve simply tried adding the weights (a 306x1 length vector) as a field to my data structure. And trying this code:
data.weights = weights;
cfg = [];
cfg.xlim ='maxmin';
cfg.zlim = 'maxmin';
cfg.layout = 'neuromag306all.lay';
cfg.channel = 'MEG';
cfg.parameter = 'weights';
figure; ft_topoplotER(cfg,data); colorbar
Unsurprisingly, this doesn’t work. It results in the error 'field “weights" not present in data’. I assume because the weights field is not interpretable by the fieldtrip code. I guessed the lack of a dimord field for the weights might be underlying its lack of interpretability, but playing around with that has not worked either. I’ve tried adding a ‘weightsdimord’ field with the [306x1] dimensions, but this also - unsurprisingly - didn’t work.
Is there a way around this? Will I need to use lower level functions than ft_topoplotER? If so, can anyone advise on how I might implement this?
Many thanks for your time,
Benjy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210305/1f42b894/attachment.htm>
More information about the fieldtrip
mailing list