[FieldTrip] Support vector machine

Arana, S.L. (Sophie) S.Arana at donders.ru.nl
Wed Nov 21 18:10:21 CET 2018


Hi Martin,

the options for svm as supported by the dml toolbox are limited to the properties of the svm class, that is weights, regularization, precomputed kernels and output (see fieldtrip/external/dmlt/+dml/svm.m)

You can adjust those via the config you pass to ft_timelockstatistics, such as for example:

cfg = [];
cfg.method = 'crossvalidate';
cfg.type = 'nfold'
...
cfg.mva = dml.analysis({dml.svm('C',lambda,'anyotheroption',xx})

out = ft_timelockstatistics(cfg...)

Concerning the implementation, I am not using the svm bit of the toolbox myself, so I am by no means an expert but let me give it a shot. From what I see you can either by option 'native'=true use the svm as implemented in the Bioinformatics toolbox, otherwise the toolbox will compute a linear kernel and compute the classifier with quadratic loss as specified in fieldtrip/external/dmlt/external/svm/l2svm_cg. It seems there are more options implemented there for finding the weights but I'm afraid in order to get at those you would have to adjust the input arguments yourself in the svm.m code (i.e. line 70 & 75).

Hope this helps a bit.
Best,
Sophie

___________________
M.Sc. Sophie L. Arana
 
Doctoral researcher
Neurobiology of Language - MPI for Psycholinguistics
 
Max Planck Institute for Psycholinguistics
PO Box 310, 6500 AH Nijmegen
Netherlands
 
T +31 24-3610887
E sophie.arana at mpi.nl
________________________________________
From: fieldtrip <fieldtrip-bounces at science.ru.nl> on behalf of Martin Rosenfelder <martin.rosenfelder at uni-ulm.de>
Sent: Wednesday, November 21, 2018 4:14 PM
To: fieldtrip at science.ru.nl
Subject: [FieldTrip] Support vector machine

Dear fieldtrip community,

I am using the DMLT toolbox' svm in order to classify EEG data in two different conditions. More precisely, the SVM is trained on trigger-based trials for a mental motor imagery condition and a resting state condition.
The classifier works fine with accuracy rates between 50-80 %. In order to boost the performance of the classifier I would now like to look into the parameterization of the classifier, e.g. how the classifier is build. This includes decision rules the classifier uses in order to analyze the data I am feeding in.
I was able to detect the SVM behind the ft_crossvalidate function but not how it works or how I can customize it.
Is there a possibility to 'personalize' the SVM in the DMLT Toolbox?

Thank you very much in advance for your help and effort!

Best,
Martin
--
M.Sc.-Psych. Martin Rosenfelder
Wissenschaftlicher Mitarbeiter
Klinische und Biologische Psychologie
Universität Ulm
Raum 47.2.259
+49 731-50 26592
martin.rosenfelder at uni-ulm.de


_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202




More information about the fieldtrip mailing list