| Algorithm 1: Multilayer Perceptrón algorithm implemented for the EMG |
| 1
|
| 2
|
|
|
| 3 /*** output vector T where the labeling value is stored by one-hot-encoding of each the classes***/
|
| 4
|
|
|
| 5
|
|
|
| 6
|
|
|
| 7 /**Divide p into a test (
and a training set
**/
|
|
|
| 8
|
| 9
|
|
|
| 10 /**Random Initialization**/
|
| 11
|
|
|
| 12
|
| 13
|
|
|
| 14
|
|
|
| 15
|
| 16 //ReLu activation function
|
|
|
| 17
|
| 18 //Softmax activation function
|
|
|
| 19
|
|
|
| 20
|
| 21 /**Loss function (categorial cross entropy**/
|
| 22
|
|
|
| 22
|
| 24
|
|
|
| 25
|
| 26
|
|
|
| 27
|
| 28
|
| 29
|
| 30
|