"Toward Talent Scientist: Sharing and Learning Together" --- Jingwei Too
- This toolbox contains deep learning algorithm - Convolution neural network ( CNN )
- The
Main
file shows examples of how to use CNN programs with the benchmark data set
imgs
: feature vector ( height x width x channel x Instances )label
: label vector ( Instances x 1 )opts
: parameter settingskfold
: number of folds in k-fold cross-validationLR
: learning ratenB
: number of mini batchMaxEpochs
: maximum number of epochsFC
: number of fully connect layer ( number of classes )nC
: number of convolutional layer ( up to 3 )nF1
: number of filter in 1st convolutional layersF1
: size of filter in 1st convolutional layernF2
: number of filter in 2nd convolutional layersF2
: size of filter in 2nd convolutional layernF3
: number of filter in 3rd convolutional layersF3
: size of filter in 3rd convolutional layer
CNN
: Deep learning model ( It contains several results )acc
: overall accuracycon
: confusion matrixt
: computational time (s)
% Benchmark dataset
[imgs,label] = digitTrain4DArrayData;
% Parameter setting
opts.kfold = 5;
opts.LR = 0.01;
opts.nB = 100;
opts.MaxEpochs = 20;
opts.nC = 1;
opts.FC = 10;
opts.nF1 = 16;
opts.sF1 = [3, 3];
% Convolutional Neural Network
CNN = jCNN(imgs,label,opts);
% Accuracy
accuray = CNN.acc;
% Confusion matrix
confmat = CNN.con;
% Benchmark dataset
[imgs,label] = digitTrain4DArrayData;
% Parameter setting
opts.kfold = 5;
opts.LR = 0.01;
opts.nB = 100;
opts.MaxEpochs = 20;
opts.nC = 3;
opts.FC = 10;
opts.nF1 = 16;
opts.sF1 = [3, 3];
opts.nF2 = 32;
opts.sF2 = [3, 3];
opts.nF3 = 64;
opts.sF3 = [3, 3];
% Convolutional Neural Network
CNN = jCNN(imgs,label,opts);
% Accuracy
accuray = CNN.acc;
% Confusion matrix
confmat = CNN.con;
- MATLAB 2017 or above
- Statistics and Machine Learning Toolbox
- Neural Network Toolbox
@article{too2019featureless,
title={Featureless EMG pattern recognition based on convolutional neural network},
author={Too, Jingwei and Abdullah, A and Saad, N Mohd and Ali, N Mohd and Zawawi, TT},
journal={Indonesian Journal of Electrical Engineering and Computer Science},
volume={14},
number={3},
pages={1291--1297},
year={2019}
}