Motor imagery

Normally, OpenBMI toolbox consist of three step (preprocessing, feature extraction, classification)

You can choose preprocessing or feature extraction method in our toolbox.

 

Make paradigm

You can be easily made motor imagery paradigm by Makeparadigm_MI function.

Setting the time stimuli, time interval, resting time, number of trial, number of class and so on.

(This function is psychtoolbox based function. You can download the psychtoolbox site )

Makeparadigm_MI({'time_sti',5,'time_isi',3,'time_rest',3,'num_trial',50,'num_class',3,'time_jitter',0.1,'screenNumber',2})

Motor imagery paradigm demo video.



After data acquisition, you can analysis your own data.

 

Environment setting
You can refer environment setting tutorial.

 

Data analysis

Preprocessing with frequency and time interval.

CNT=prep_filter(CNT, {'frequency', [7 13]});
SMT=prep_segmentation(CNT, {'interval', [750 3500]});

Feature extraction by Spatial-frequency optimization module.

[SMT, CSP_W, CSP_D]=func_csp(SMT,{'nPatterns', [3]});
FT=func_featureExtraction(SMT, {'feature','logvar'}); 

Example code of calculating the accuracy obtained by classifier.

[cf_out]=func_predict(FT, CF_PARAM); 
[loss out]=eval_calLoss(FT.y_dec, cf_out);

Example code of Cross-validation.

CV.var.band=[7 20];
CV.var.interval=[750 3500];
CV.prep={ % commoly applied to training and test data before data split
    'CNT=prep_filter(CNT, {"frequency", band})'
    'SMT=prep_segmentation(CNT, {"interval", interval})'
    };
CV.train={
    '[SMT, CSP_W, CSP_D]=func_csp(SMT,{"nPatterns", [3]})'
    'FT=func_featureExtraction(SMT, {"feature","logvar"})'
    '[CF_PARAM]=func_train(FT,{"classifier","LDA"})'
    };
CV.test={
    'SMT=func_projection(SMT, CSP_W)'
    'FT=func_featureExtraction(SMT, {"feature","logvar"})'
    '[cf_out]=func_predict(FT, CF_PARAM)'
    };
CV.option={
'KFold','7'
};

[loss]=eval_crossValidation(CNT, CV); 

This tutorial is only contained small example code, parameter settings or methods can be modified by user.

 

If you need other types of tutorials, click the down text.

SSVEP tutorial, P300 tutorial