okbalefthanded / bci_toolbox

Classification toolbox for ERP and SSVEP based BCI data
Apache License 2.0
51 stars 27 forks source link

how to use the function gmksvm_train #15

Closed KakashiZs closed 5 years ago

KakashiZs commented 5 years ago

First, thank you very much for the code that you created! when I want to use the function gmksvm_train.m(bci_toolbox/machine_learning/classification/backends/mkl/gmksvm/gmksvm_train.m), Matlab gives me an error: "Undefined function or variable: mean_and_std" . I try hard but can not find the function mean_and_std. So could you please give a demo or an example using the MKL function?

KakashiZs commented 5 years ago

detail of the error is: "Undefined function or variable gmksvm_train (line 26) mod.nor.dat{m} = mean_and_std(tra{m}.X, par.nor.dat{m});"

okbalefthanded commented 5 years ago

The toolbox API classification is built upon two major functions: _mltrainClassifier and _mlapplyClassifier, each method has its own ml_train/ml_apply function. for the MKL algorithms we're using the code provided with this paper http://www.jmlr.org/papers/v12/gonen11a.html _mltrainGMKL is a wrapper function that calls _gmksvmtrain with proper parameters, those inputs are specified earlier in the process in the first step. you can find how to define an approach in the script _define_approachERP.m

KakashiZs commented 5 years ago

Thank for your reply, it helps me a lot! :)