This sample scripts are described in the paper "Subject-transfer framework with unlabeled data based on multiple distance measures for surface electromyogram pattern recognition" accepeted to Biomedical Signal Processing and Control.
<Description>
After changing information about your directories in main_script.m (lines 6 and 8), downloading getxxfeat.m, and installing LIBSVM package, you can use this codes.
This project has three folders:
-
data
- private
- 22-class (1-DoF 8-class and 2-DoF 14-class) EMG data from 25 subjects
- The detail is described in here
- We only used 1-DoF 8-class data (i.e., from M1T1.csv to M8T5.csv)
- The detail is described in here
- csv files (each data has 5-s information: the last 1 s is already cut)
- M means the motion label (e.g., M1 means resting state and M2 means wrist flexion)
- T means the number of trials
- After applying preprocessing_ds1.m, F_c.mat will be added in the folter .../data/private.
- 22-class (1-DoF 8-class and 2-DoF 14-class) EMG data from 25 subjects
- NinaPro DB5 exerciseA
- 12-class finger motions from 10 subjects
- You can get this datasets from here
- You can get this datasets from here
- Put SX_E1_A1.mat in each subject's folder
- S means the subject
- After applying preprocessing_ds2.m, F_c.mat will be added in the folter .../data/NinaPro DB5 exerciseA
- 12-class finger motions from 10 subjects
- NinaPro DB5 exerciseB
- 17-class hand and wrist motions from 10 subjects
- Put SX_E2_A1.mat in each subject's folder
- S means the subject
- After applying preprocessing_ds3.m, F_c.mat will be added in the folter .../data/NinaPro DB5 exerciseB
- 17-class hand and wrist motions from 10 subjects
- NinaPro DB5 exerciseC
- 23-class hand and wrist motions from 10 subjects
- Put SX_E3_A1.mat in each subject's folder
- S means the subject
- After applying preprocessing_ds4.m, F_c.mat will be added in the folter .../data/NinaPro DB5 exerciseC
- 23-class hand and wrist motions from 10 subjects
- private
-
code
this folder has one main m.file named main_script that uses:- set_config
- preprocessing_ds1
- extract_features
you can get the following m.files from here
- getrmsfeat
- getmavfeat
- getzcfeat
- getsscfeat
- getwlfeat
- getarfeat
- getrmsfeat
- extract_features
- preprocessing_ds2
- extract_features
- getrmsfeat
- getmavfeat
- getzcfeat
- getsscfeat
- getwlfeat
- getarfeat
- getrmsfeat
- extract_features
- preprocessing_ds3
- extract_features
- getrmsfeat
- getmavfeat
- getzcfeat
- getsscfeat
- getwlfeat
- getarfeat
- getrmsfeat
- extract_features
- preprocessing_ds4
- extract_features
- getrmsfeat
- getmavfeat
- getzcfeat
- getsscfeat
- getwlfeat
- getarfeat
- getrmsfeat
- extract_features
- evaluate_lda_acc
- evaluate_svm_acc
you can make the m scripts, svmtrain.m and svmpredict.m from here
- svmtrain (LIBSVM)
- svmpredict (LIBSVM)
- supervised_STM
- find_target
- calculate_A_b
- find_target
- svmtrain (LIBSVM)
- evaluate_lda_mdms
- evaluate_svm_mdms
- svmtrain (LIBSVM)
- svmpredict (LIBSVM)
- supervised_STM
- find_target
- calculate_A_b
- find_target
- svmtrain (LIBSVM)
- evaluate_lda_random
- evaluate_svm_random
- svmtrain (LIBSVM)
- svmpredict (LIBSVM)
- svmtrain (LIBSVM)
- visualize_results
- set_config
-
resuts
this folder will store results_lda/svm_acc/mdms/random_dsx.mat and boxplots.fig.
<Environments>
Windows 10
MATLAB R2020a
1. Signal Processing Toolbox
2. Statics and Machine Learning Toolbox
3. Parallel Comupting Toolbox