Matlab Code

This Matlab code has been developed to facilitate the process of training 1D CNNs. The code creates both training and testing CDFs based on the data provided in \DATA_FILES\, then runs the CNN training/testing, and finally displays the confusion matrix. The folder \MATLAB\ includes the following Matlab functions:

  • main.m: the main function which you need to run.

  • createConf.m: a function to create conf files.

  • generateCDF.m: a function to generate training and testing CDFs.

  • normalize.m: a function to normalize each frame between -1 to 1.

  • shuffleCol.m: a function to Shuffle the training frames randomly.

Important Notes:

  • In main.m, make sure that DIR is correct.

  • Make sure that matlab is running with administrator privilege.

  • To prepare the data for n classes, use Matlab to store the input data in variables c1, c2, .. , cn as vertical arrays. For example, the input frames associated with the 2nd class should be stored in the variable c2 as a single column vector. After that, save all variables into a single .mat file. See /DATA_FILES/train_sample.mat for example.

  • Make sure that frameSize is compatible with fs and ssx. Otherwise, the CNN will not be trained. For more information, please read this paper.

  • Send me an email if you have any problem running the code: